Re: [csswg-drafts] [css-color-4] matching displayed colors between CSS colors and images when those colors are outside the displayable gamut (#10055)

> In the current CSS gamut mapping specification, it is impossible for a content author to achieve the same color across CSS, images, video, and canvas. 

I think it is extremely important that we always say this with the complete context.

It is absolutely possible to color match even when following the specification.
But only for colors that fit within the displayable color gamut.

Shipping the css-color-4 gamut mapping algorithm does not take away a feature from authors.

Authors can also use `@media (color-gamut: ...)` to conditionally apply other colors, images, ... So even wider gamut images and css-colors can be color matched without causing issues for users on srgb gamut screens.

-----

> I believe it's as simple as specifying the same color using color(display-p3 ...) as is used in an image or a canvas, and it will match, since browsers currently treat colors the same in all of these contexts.

Yes, that is what currently shipped, not what was specified.
But this clipping is also very undesirable behavior.

-----

Let me try and restate the question.

Imagine that implementers actually followed the specification and implemented gamut mapping :)

How large is the real world issue of color matching between css colors and images/canvas?
Keeping in mind that all colors that do fit within the displayable gamut would always match.

Is `@media (color-gamut: ...)` sufficient for those authors that do need to match colors?

If this is not sufficient, what is missing?

-------

_I don't want this to become another threat where we debate the validity of the gamut mapping algorithm :) We already have enough of those._

_I would like to keep this focused on trying to find ways to make progress._

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10055#issuecomment-2010796800 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 20 March 2024 22:43:49 UTC