W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

[csswg-drafts] [css-color-4] Define gamut mapping (#5191)

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Thu, 11 Jun 2020 06:55:21 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-636767716-1591858520-sysbot+gh@w3.org>
LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Define gamut mapping ==
Since we now support a number of wide gamut spaces (display-p3, prophoto etc, but also lab/lch whose gamut is the entire spectral locus), we might want to define gamut mapping as it can dramatically affect what is displayed. Leaving it up to the implementation sabotages any effort at device independent color.

This is not a new issue: on screens whose gamuts are smaller than sRGB, CSS colors still have to be gamut mapped to be displayed. However, it is currently undefined, and up to implementations.

One constraint is that we cannot use sophisticated rendering intents that take the entire webpage into account, like what is used in photography, since that would be prohibitively expensive, not to mention inherently insecure. So, we need to specify a gamut mapping algorithm that operates entirely on the `<color>` value.

LCH chroma reduction is a common one, but fails terribly for yellows, producing results far worse than even simple component clipping. E.g. when `color(display-p3 1 1 0)` is converted to sRGB using chroma reduction via binary search, it produces `rgb(100% 97.5% 77.4%)`, a light yellow, whereas something closer to `rgb(95% 100% 0%)` would have been a far better fit.

@svgeesus has found some papers & book references that would be helpful, but I'll leave it up to him to link/quote them.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5191 using your GitHub account
Received on Thursday, 11 June 2020 06:55:22 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:27 UTC