fixes #9

Check if the color is monochrome before calculating the luminance value.