-
Notifications
You must be signed in to change notification settings - Fork 715
[css-color-5] Clarify / add example of gamut mapping during color-mix() #6913
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
I agree this is under-specified and confusing. I suspect the language you quote was not updated when we went to extended colorspaces for all the predefined RGB spaces.
Well ideally it would produce CSS Color 4 says, in Color Spaces for Interpolation:
I think the fix is to change the text you cited, from "has a smaller gamut" to "cannot express the color" plus adding an example. |
Is it safe to say that for the non-legacy colors, gamut mapping will only happen at used value time? For things like computed value, returning the un-mapped value is the right thing to do? |
@weinig yes, indeed |
Clarified that gamut mapping for Added an example, with display-p3 green mixed in hsl. |
The
color-mix()
function has the following step defined:It would be useful to understand exactly when this applies, as its not entirely clear to me.
For instance, would the following require gamut mapping?
Should the
color(display-p3 0 1 0)
color be gamut mapped to the sRGB gamut, or would it be ok for this to produce a result likecolor(srgb -5.35 10.17 -3.43)
?Presumably this only applies to
srgb
,srgb-linear
,hsl
andhwb
at the moment as well, but clarification would also be helpful.The text was updated successfully, but these errors were encountered: