What is hue-rotate(270deg)?

2020-10-20 17:37:49 | Web Design | 1k+ Reads

This is a tonal rotation filter.

Assuming your original picture is yellow, this code will make your yellow picture purple.

The complete code is style="filter: hue-rotate(270deg);"

You can use star.png as a test.

I have given the picture here, you will understand if you try to do it.

Demo:

<p><img alt="" src="/upload/images/star.png" /></p>

<p><img alt="" src="/upload/images/star.png" style="filter: hue-rotate(270deg);" /></p>

Nice!

This means you don't need to use two pictures to express the color changes of the same object.

Saved bandwidth.

This article was last edited at 2025-03-08 13:36:59