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

Hue angle is not remembering between adjusters #37

Open
Semigradsky opened this issue Nov 5, 2017 · 0 comments
Open

Hue angle is not remembering between adjusters #37

Semigradsky opened this issue Nov 5, 2017 · 0 comments

Comments

@Semigradsky
Copy link

One adjuster:

 color(hwb(120, 44%, 50%) w(+ 20%))
//=> rgb(143, 143, 143) | hwb(0, 56%, 44%) | hsl(0, 0%, 56%)

It's okay.

Two adjusters:

color(hwb(120, 44%, 50%) w(+ 20%) s(+ 20%))
//=> rgb(165, 120, 120) | hsl(0, 20%, 56%)

It is not okay. The result should be rgb(120, 165, 120) | hsl(120, 20%, 56%).

See example 11 in spec: https://drafts.csswg.org/css-color-4/#modifying-colors

However, the color-mod() function remembers that the hue of the color was originally 120deg, so when the second operation saturates the color, it will result in a greenish-gray again (hsl(120deg, 20%, 56%), slightly lighter and brighter than the original color, which is what was intended).

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

No branches or pull requests

1 participant