Updated grayscale filter to use luminosity method