Re: [csswg-drafts] [css-color-4] Disagreements over gamut mapping (#7610)

> @weinig might you be able to summarize the "architecture" of color handling in Safari?

Not sure I can comprehensively summarize the architecture of color handling in WebKit in a succinct manner, but I can explain what our current behavior and longer term intentions are with out-of-gamut colors. 

Currently, WebKit keeps colors in their described form (so, for instance, `color(srgb 2 0 0)` keeps the 2) up until use time, so that means the computed values should show the same out of gamut values. Then at use time, we paint into a context and allow the platform to perform its default gamut mapping.

A change we plan to make is that instead of using the platform specific gamut mapping, we are going to use the CSS Gamut mapping algorithm (https://drafts.csswg.org/css-color-4/#css-gamut-mapping). We are still trying to determine whether it makes sense to gamut map to the exact color space of the underlying context (usually the color space of the display) or to instead pick a color space based on the gamut matched by the `color-gamut` media query. So for instance, for a color used on a display with a gamut at least as big as Display-P3, we would use the CSS Gamut mapping algorithm to map to Display-P3. I think the first approach (mapping using the CSS Gamut mapping algorithm to the display's color space) would be preferred, as that would more closely match images, but it has some drawbacks due to not being consistent across machines.

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


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

Received on Wednesday, 17 August 2022 22:20:42 UTC