How do I convert the RGB values of a pixel to a single monochrome value?
Right-click the picture that you want to change, and then click Format Picture on the shortcut menu. Click the Picture tab. Under Image control, in the Color list, click Grayscale or Black and White.
Advantages: To store a single colour pixel of an RGB colour image we will need 8*3 = 24 bits (8 bit for each colour component), but when we convert an RGB image to grayscale image, only 8 bit is required to store a single pixel of the image.
The RGB color 90, 90, 90 is a dark color, and the websafe version is hex 666666. A complement of this color would be 90, 90, 90, and the grayscale version is 90, 90, 90. A 20% lighter version of the original color is 140, 140, 140, and 45, 45, 45 is the 20% darker color.
I found one possible solution in the Color FAQ. The luminance component Y (from the CIE XYZ system) captures what is most perceived by humans as color in one channel. So, use those coefficients:
mono = (0.2125 * color.r) + (0.7154 * color.g) + (0.0721 * color.b);
This recent scientific article compares the state-of-the-art in converting color photographs to grayscale, including the simple luminance formula and more complex techniques.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With