Sign in to follow this  

Photoshop channel compositing algorithm?

This topic is 3464 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is something of an art question, but I am looking for specific algorithm math here so I guess this is the appropriate forum. In Photoshop, in the composite RGB channel of an RGB image filled with 50% gray, the eyedropper color picker shows all pixels have a value of [r=128, g=128, b=128]. If you isolate the red channel alone, copy the contents, and paste into a new, empty RGB (not grayscale) image, the eyedropper color picker will show all pixels to have a value of [r=149, g=149, b=149]. Does anybody know the specific math of what is happening here? I had always assumed the composite RGB channel was constructed additively, I guess that was naïve haha.

Share this post


Link to post
Share on other sites
What you're probably looking at is a greyscale conversion.

If you put three stripes of pure red, green, and blue on-screen, you'll notice that (255,0,0), (0,255,0), and (0,0,255) are not all the same brightness. Maximum blue is not as bright as maximum green. That's largely because our eyes don't pick up these colours in the same intensities.

So when a well-made bit of graphic software like Photoshop converts colour to greyscale, it doesn't do it equally. Green is the most intense, followed by red, and then by blue. I forget the exact scalars used by the RGB colourspace, but it is not (R+G+B)/3. It's more like R*0.35 + G*0.4 + B*0.25.

Photoshop is probably doing that behind the scenes, because you're using 1-channel data, and Photoshop assumes that because it is only one channel, it must be greyscale.

Share this post


Link to post
Share on other sites

This topic is 3464 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this