- From: Chris Lilley via GitHub <sysbot+gh@w3.org>
- Date: Wed, 12 Jun 2024 13:44:58 +0000
- To: public-css-archive@w3.org
> CSS and images/videos have had color-matching in sRGB and P3 for many years. (This wasn't always true, but we were able to pull it off in CSS2.) This is still a common, important use-case for authors, and\ as images are now being deployed in the wild using P3-compatible gamuts or wider, we want to preserve it. > > * We should ensure that, _by default_, CSS colors and image/video colors map > in the same way so color-matching works when both are using the same gamut, > at least within realistic image/video gamuts. Pushing some more on this assertion that in-gamut colors in images never change, here are a few useful diagrams from Ján Morovič ["Color Gamut Mapping"](https://www.wiley.com/en-us/Color+Gamut+Mapping-p-9780470030325). These are all using typical RGB to CMYK gamuts so absolutely no "unreasonable" colors. The first shows a variety of input-to-output transfer functions used in gamut mapping; only one (here, labelled clipping) has a straight line where output=input for in-gamut colors. The others use a soft knee, or a sigmoidal function, to ease the transition and thus, some or all in-gamut colors change.  Next, a division of gamut volume into **core** colors which will not change, **destination** colors (the intersection of source and destination, minus core) where gamut compression is applied, and **source** (outside destination; all colors will change):  And lastly, a constant hue and lightness-compressing GMA which uses that core/destination division to perform gamut mapping into the destination:  -- GitHub Notification of comment by svgeesus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-2163052283 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 12 June 2024 13:44:58 UTC