How does hue-rotate() work after all ?

Well I wondered that too, I had an idea of "how it could work", so this pen is the simplest way I found to explain how the hue-rotate() function of the filter: ; CSS property could work.

It's all about the chromatic wheel, think about color wheel, and if you could set a cursor, it would be pointing the color of your element. On my example, the element is the square , and the color selected on the colorwheel is shown by a circle / lense .


You can change the background-color value of the square by directly editing it, and apply some color-hue to it by playing with the input .

hue-rotate(0deg)