RGB -> Grayscale question

JG
Posted By
Justin_Giovanetti
Jul 20, 2004
Views
627
Replies
8
Status
Closed
Does anyone know what the formula is that photoshop uses to convert from RGB mode to Grayscale. I’ve seen the formula: .3xRed + .59xGreen + .11xBlue = luminance But that equation doesn’t add up.

Take for example the color Red converted in Photoshop.
Red=R-255, G-0, B-0 -> converted to B&W in PhotoShop = R-130, G-130, B-130

Now using the above equation:
Red=R-255, G-0, B-0 -> .3×255 + .59×0 + .11×0 = 76.5
Not sure if I am supposed to then apply the 76.5 to every channel inorder to get it’s gray value. If so it would be: R-76.5, G-76.5, B-76.5 which is different than what photoshop gives me: R-130, G-130, B-130

Thanks
Justin

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

CC
Chris_Cox
Jul 20, 2004
There is no one formula — it depends on the RGB colorspace and the Grayscale colorspace you have chosen

Also, the weighting factors need to be applied to linear RGB data (removing the gamma encoding/Tone Response Curve).
JS
John_Slate
Jul 20, 2004
R-130, G-130, B-130 are not grayscale readings
JG
Justin_Giovanetti
Jul 20, 2004
Take the color Red: R-255, G-0, B-0 and now convert that color to grayscale in Photoshop, you end up with: R-130, G-130, B-130. Actually the color becomes slightly dithered, it ends up getting a dithered color of 129–131 for all 3 channels. 130 roughly.
MO
Mike_Ornellas
Jul 20, 2004
Like Chris says Justin – the source and destination color space, along with the color engine and rendering intent control the final outcome of the numbers.
JG
Justin_Giovanetti
Jul 20, 2004
Yes, you’re right. I did a test; made a doc that was in a different color space and then converted it to Grayscale and wala, the numbers had changed slightly. The relationship between the colors stay roughly the same though. From lightest to darkest it goes: Yellow, Cyan, Green, Magenta, Red, Blue.

My real question appears to be not so much about grayscale conversion, but about Luminance vs. Brightness vs. Lightness, or what is the human eye’s perception of the three.
Everywhere I look it says the CIE Chromaticity Chart shows what colors are perceived Brightest. "Though yellow may be a lighter color, it is not a ‘brighter’ color."
And then it gives the formula:
(.3xRed) + (.59xGreen) + (.11xBlue)= Luminance/brightness

That formula seems to make sense, green being timed by the largest number. But then how is it that Yellow comes up with the a value of 226.95 and green only comes up with a value of 150.45. That is if Green is supposed to be brighter than yellow, how come green has the lower value? Obviously yellow has R255 + G255 + B0, where green only has R0 + G255 + B0, thus yellow would return the larger value. Am I supposed to find the sum average of the 3 channels, or maybe just take the largest of the 3 or something before I apply this formula:
(.3xRed) + (.59xGreen) + (.11xBlue)= Luminance/brightness

Thank you, much appreciated.

Here’s a diagram I made to help me make sense of all this: <http://www.element9design.com/COLOR_INFO/RGB_CMY.gif>
DG
Dana_Gartenlaub
Jul 21, 2004
Solution, just use the Channel Mixer and convert to greyscale depending on what film you’re trying to imitate.

I got this off a photography board, a fellow named Mike posted it:

Agfa 200X: 18,41,41
Agfapan 25: 25,39,36
Agfapan 100: 21,40,39
Agfapan 400: 20,41,39

Ilford Delta 100: 21,42,37
Ilford Delta 400: 22,42,36
Ilford Delta 400 Pro: 31,36,33

Ilford FP4: 28,41,31
Ilford HP5: 23,37,40
Ilford Pan F: 33,36,31
Ilford SFX: 36,31,33
Ilford XP2 Super: 21,42,37

Kodak Tmax 100: 24,37,39
Kodak Tmax 400: 27,36,37
Kodak Tri-X: 25,35,40

And these basic ones:

Normal Contrast: 43,33,30
High Contrast: 40,34,60

After you type these settings in, you can ‘save’ them (or your tweaks) in Photoshop (***.cha files) so you don’t have to keep typing ’em in.
JG
Justin_Giovanetti
Jul 21, 2004
Thank you for your reply, though my real question appears to be not so much about grayscale conversion, but about Luminance vs. Brightness vs. Lightness, or what is the human eye’s perception of the three.
Everywhere I look it says the CIE Chromaticity Chart shows what colors are perceived Brightest. "Though yellow may be a lighter color than green, it is not a ‘brighter’ color."
And then it gives the formula:
(.3xRed) + (.59xGreen) + (.11xBlue)= Luminance/brightness

That formula seems to make sense, green being timed by the largest number. But then how is it that Yellow comes up with the a value of 226.95 and green only comes up with a value of 150.45. That is if Green is supposed to be brighter than yellow, how come green has the lower value? Obviously yellow has R255 + G255 + B0, where green only has R0 + G255 + B0, thus yellow would return the larger value. Am I supposed to find the sum average of the 3 channels, or maybe just take the largest of the 3 or something before I apply this formula:
(.3xRed) + (.59xGreen) + (.11xBlue)= Luminance/brightness

Thank you, much appreciated.

Here’s a diagram I made to help me make sense of all this: <http://www.element9design.com/COLOR_INFO/RGB_CMY.gif>
CC
Chris_Cox
Jul 21, 2004
CIE L* is approximately what you perceive.

The common Brightness, Lightness, and Luminosity definitions are approximations.

Yellow is lighter than Green — when they have the same maximum value. Your eye is more sensitive to green wavelengths than to yellow wavelengths — but RGB monitors don’t show spectral colors.

Yellow = 1.0 Red + 1.0 Green = 0.89 Luminance
Green = 1.0 Green = 0.59 Luminance

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections