# Which value does scrolling in the shader change?

When I hover with the mouse over the color changer, see the screenshot, and then scroll, the values are changing in a very strange pattern. It is neither only hue, saturation or value, but all of them? Is this a bug?

• if you change the position of the dot in the circle il will change the hue and saturation but not the value, you can change the value with the black and white gradient bar on the right of the circle Commented Dec 5, 2022 at 14:41
• When I use the black and white gradient bar on the right of the circle the hue, saturation and value change, even though it's tooltip is "Value" Commented Dec 5, 2022 at 15:02
• yes I've never noticed that, whereas if you change the value itself it won't make hue and saturation move, so I guess the gradient bar is not 100% the value, I hope someone will give a technical answer Commented Dec 5, 2022 at 15:17

Scrolling while hovering the wheel acts on RGB values, not HSV. More precisely, it increase/decrease the value of each RGB component by ~20%, until one of them reach 1.0 or 0.0. (The same logic applies when you use the gradient bar)

By increasing the value of each RGB component, we of course increase the HSV Value, which is the value of the highest component, red in your case.

Now, if you look at your values, red is 0.523 and blue is only 0.025. By increasing each by 20%, we add way more red than blue, so the Hue and Saturation will change.

Please note that this is only empiric deduction by playing with the values. I didn't check the code so maybe I miss some important things.

• The gamma corrected (sRGB) hex value jumps by $$255÷20 = 12{3\over4}$$ which means every 4 scroll steps it changes exactly by $51 =$ 0x33: i.imgur.com/LZAHk2P.gif Commented Dec 5, 2022 at 20:31
• So if I understand correctly, in sRGB the steps are fixed. Then it would be the conversion in linear RGB, that give bigger steps for higher values ? Commented Dec 5, 2022 at 21:01
• yes, sRGB is perceptually linear, and we perceive changes in brightness in a logarithmic scale. Commented Dec 6, 2022 at 0:10