-
Notifications
You must be signed in to change notification settings - Fork 707
[css-color] interpolating between color spaces #883
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
Comments
You are right that the endpoints need to be converted. However, the concept of "biggest" is poorly defined (for example the P3 and AdobeRGB gamuts are roughly the same size, and neither fully encloses the other). Instead, the Working Colorspace is what they are converted to. The defaut value of that space is sRGB, obviously, but other options will include P3, Rec2020, and Lab/LCH. |
Note that this affects gradients as well, not just transitions. |
The CSS Working Group just discussed
The full IRC log of that discussion
|
Like this The "biggest space" is lab, and all colors can be converted to and from that exactly. |
Now documented in the CSS Color 5 section on interpolating colors |
How should a transition between "blue" and "color(display-p3 1 0 0)" work?
My current thought is to work out which of the endpoints is in the biggest color space, convert the endpoint in the smaller space to the bigger space (which won't always be 100% accurate), then apply the interpolation.
However:
... both in a way that is interoperable between all browsers.
The text was updated successfully, but these errors were encountered: