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

> When I was writing the spec change for WCG canvas, I was definitely intending "relative colorimetric intent" to mean "clipping" (although I now see that there are various definitions of various vagueness for this).

The basic definition of relative colorimetric is that:

1. The white points are matched (not an issue if they are all D65) and scaled to the same value (here, 1 1 1)
2. Colors inside the gamut are strictly unchanged
3. Colors outside the gamut are moved to a similar-looking in-gamut color

The third point can be achieved with various levels of fidelity. Simple clipping is the fastest, and produces the worst results. Choosing the color with the lowest deltaE to the original color (MINDE) is better, but still not good because we are most sensitive to changes in hue, then to changes in lightness, and least of all to changes in chroma. Choosing a color with lower chroma and the same hue and lightness gives good results, but depends on which color space and distance metric is being used and can over desaturate in some cases. Choosing the color with lowest OKLCH chroma, using deltaEOK, and finishing up by using a local MINDE step once the difference is below a Just Noticable Difference is what CSS Color 4 specifies, and so far gives the highest quality result for single colors and colors in gradients. It is also more efficient and higher quality than the previously specified method (chroma reduction in CIE LCH, deltaE2000, local MINDE).

Since canvas is driven from script, it is easy for script authors to use their own gamut mapping stage if they wish (like my demo does). Canvas clip can then be seen as a failsafe (if they get this wrong, or don't do it).

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


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

Received on Saturday, 20 August 2022 10:58:51 UTC