Skip to content

[css-color-5] Clarify / add example of gamut mapping during color-mix()  #6913

Closed
@weinig

Description

@weinig

The color-mix() function has the following step defined:

Both colors are converted to the specified <color-space>. If the specified color space has a smaller gamut than the one in which the color to be adjusted is specified, gamut mapping will occur.

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?

color-mix(in srgb, color(display-p3 0 1 0) 100%, red 0%)

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 like color(srgb -5.35 10.17 -3.43)?

Presumably this only applies to srgb, srgb-linear, hsl and hwb at the moment as well, but clarification would also be helpful.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions