Image HSV Values Don't Map to Color Ramp - Why?

I’m trying to use a Texture Paint image as a factor for mixing shaders, after first passing it through a Color Ramp node. I expected that a painted color with an HSV value of 0.2 would map to the 0.2 position on the Color Ramp node, but instead it seems to map to somewhere around the 0.03 position. Other mappings also have this weird, unpredictable offset.

What is the logic here, so I can configure all the involved Color Ramp nodes correctly? Thanks!

Short version- your texture and your color ramp are in different color spaces.
Long version- there’s a thread that can explain in great detail what I just said:

Scroll down to 900 or so

Thanks for the reply. Are there names for the two different colorspaces, and are there tools for swapping between them?

This is an… unpopular opinion, but the easy solution to your problem is to go into your properties and change your color mode to Standard:


It’s not technically correct (see the thread I linked, if you care), but it gets the job done, so I say don’t worry about it :slight_smile:

1 Like

HSV or RGB are three values… What’s an HSV value of 0.2 ??

If you just connect the color onto the Fac input from the ColorRamp node this will be converted into a grey value… this might be different by changing the Color Mode (RGB, HSV, HSL) of the ColorRamp node (… or not…never used this). If you wanna match a specific value of H, S or V with the colorramp you may want to use the Converter → Separarte HSV node to choose one.

So with some research it may be not so weird and unpredictable…

1 Like

The colorramp mode just changes the interpolation method, but you still have to input a float (separate the color input like you said)

Yes of course… i was a bit unprecise… the interpolation between the different colorstops is different according to the colorspace chosen… what i meant was: the convertion from HSV → grey or RGB → grey may be a little different (?) … of course you can convert between colorspaces and so this should be the same but maybe there are different considerations between RGB and HSV how to convert to grey according to visual perception ?? (Seems to be a haveb to do a little research too :wink:… but color theory is not only one beast… there are dragons…)

Ok ! I don’t know how type casting works in shader nodes to be frank, in converting from RGB to float, is it only the one channel ? or the luminance ?

Well the color sockets are always RGB, so HSV setups also output RGB values and those very likely get mapped the same as the the RGB to BW node does via channelbased weights to get the luminance value.