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

> Is §13.2 normative? There have been discussions about the use of the phrasing “This CSS gamut mapping algorithm” versus “The CSS gamut mapping algorithm”, and the non-normative marker on §13.1 (does it extend to all of §13?). 

13.1 is, as stated, a non-normative introduction to the topic. 13.2 is normative.

> _This_ CSS gamut mapping algorithm

Thanks for pointing out the possible ambiguity, I agree that _The_ would be better.

> Must out-of-gamut colors be mapped, using that specific algorithm, on both conversion-to-HSL and for display, to be compliant with CSS Color Level 4?

Yes. HSL (and HWB) are unable to represent out-or-sRGB-gamut colors.

> What, if anything, should be done with out-of-gamut colors in images and videos? Do we risk that using the same color in e.g. CSS and on an image mapped to different colors on the users' screens, and is that okay?

"If anything"? Colors which are out of the display device gamut cannot be displayed (by definition). 

Gamut mapping for images (and video) has different constraints to solid colors, such as preservation of image detail. For photographic images, a perceptual rendering intent should preserve most of the overall image appearance but may change in-gamut colors. For non-photographic images such as charts and diagrams, a relative colorimetric intent will give more similar results to the CSS GMA (but not identical, because the ICC code path will be using CIE Lab as the gamut mapping space). Yes, that means that out of screen gamut colors may map differently in images and in CSS, particularly _wildly_ OOG colors such as those outside the spectral locus. These are much less likely in photographic images but can occur in synthetic images.
It isn't desirable but there isn't a better option because relative colorimetric handling of photographic imagery gives terrible results.

> What about HDR images and video; are those subject to the same rules, different rules, or undefined?

The same "this is a different code path" rules i.e. not the same as CSS. In addition to the GMA there will also be tone mapping, unless the display has the same peak white as the mastering display. All of that is generally a black box, especially for HDR video.

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


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

Received on Tuesday, 16 August 2022 10:12:24 UTC