# Help with understanding the color theory of Blender's color ramps

I attempted to create a straightforward material that utilizes a grayscale texture. The goal is to assign different materials for the values 0, 0.5, and 1 (black, gray, white) of the texture.

Here’s the object with the original texture applied:

To achieve this, I employed Color Ramps set to “Constant” mode. However, here come the problematic part: The grayscale value of the gray part is 0.5 (0.5,0.5,0.5). but on the color ramp it’s work just if I set the position of the white step to 0.21 or less instead 0f 0.5.

Any assistance in resolving this issue would be appreciated.

For your purpose you have the wrong number of handles (aka color stops)

You should use 4 instead of 3

HERE :

To add a new color stop (handle) you should press [+] button on the node :

On the GIF we can see the "GB" which tells us you set the image to "sRGB" color palette.

What it means is you tell Blender the image stores color data using sRGB color transformation.

In sRGB color transformation, colors are shifted in order to even out perceptual range of brightness. The idea is: if a human doesn't see much difference between a light of 100% strength, and a light of 99% strength, but sees much better a difference between a light of 1% strength and a light of 0.5% strength, let's arrange the possible light values to be denser on the dark part of the spectrum and sparser on the light part.

So if you have a linear gradient (meaning, as you travel through the gradient with constant velocity, the rate of numeric change of pixel data is constant regardless of where you are on the gradient) in sRGB space, it seems linear to the eye (replace "numeric change" with "brightness change"), but isn't actually linear when it comes to the energy of the light. Shading in Blender is physically based, so if an image isn't saved in "linear" color space (and you tell Blender it isn't), Blender will use a so-called gamma curve to convert it. Then your 50% grey becomes about 21% in linear space.

The simplest solution to your problem: set the color space to non-color:

• Thank you so much, that works! Dec 29, 2023 at 10:47