Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[filter-effects] hue-rotate() is not accurate for saturated colors #420

Open
AlexApps99 opened this issue Apr 8, 2021 · 0 comments
Open

Comments

@AlexApps99
Copy link

The current definition of hue-rotate() is based on an SVG filter, which uses a matrix transformation on RGB color to calculate the resultant color.

This is not very desirable for some usecases, for example, a general CSS userstyle to make pages appear like a "dark mode" with invert(100%) hue-rotate(180deg) on the entire document, then selectively hue-rotate(-180deg) invert(100%) to elements such as images and videos.

I would expect a style like this to undo the effects of the inversion, so the colors of the elements are normally colored.
The actual effect is slightly off-color, due to the limitations of the current method of hue-rotate().

While it is extremely unlikely the current definition can be changed, it would be great if a new effect could be added that behaved as expected.

Relevant discussion:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants