made a version of the filter that takes an input color space