What is hue-rotate(270deg)?
Copyright Notice: This article is an original work licensed under the CC 4.0 BY-NC-ND license. If you wish to repost this article, please include the original source link and this copyright notice.
Source link: https://v2know.com/article/481
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