# Gray values different between grayscale and RGB color modes?

I'm trying to understand the different numbers I get when I convert an image from grayscale to RGB or vice versa. I'm only working with grayscale values at the moment as I'm working on a heightmap but I'll likely need the ability to add colors later.

I don't understand why 67% in grayscale goes to 42% in RGB. Shouldn't it be 33%? Is one of these color modes non-linear, and if so, is there a way I can make it linear?

I need to be able create a 25% gray and know that that's a quarter of my available altitude.

• One take into account that "color" is made by blocking white light that fall on black paint. The second is based on the fact that you take all three color sources on screen and light them in a manner to produce "gray". 42% is related to brightness of each color (255 steps of each. so it's 42% of 255). Apr 6, 2020 at 8:46
• Note that the black and white is reversed. The second value corresponds to 58% in the other direction. (Which admittedly still is a difference.) Apr 6, 2020 at 11:04
• Yeah, I expected it to be reversed, but basically 100 minus the same percentage. I'm pretty sure Grayscale is acting linearly, because if I copy a 20% gray out of another program, I get an 80% value in photoshop, and that at least makes sense to me. No idea what's up with RGB. Apr 6, 2020 at 15:56
• It has to do with which gray Working Space you have chosen in Color Settings. It looks like you have chosen Dot Gain 20%. sGray seems to follow the brightness of a chosen sRGB gray 1:1. I'm looking forward to someone explaining the background in detail, which I'm not capable of. Apr 6, 2020 at 16:22