[csswg-drafts] [css-color-4] Define target for gamut mapping for 2D canvas (#10112)

ccameron-chromium has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Define target for gamut mapping for 2D canvas ==
When rendering a CSS color such as our friend `oklch(90% 90% 0deg)` to a 2D canvas, what gamut should the color be mapped to?

It's not possible to map to the gamut of the display. Two reasons:
* The display is not knowable in general. E.g, an offscreen canvas, something being streamed to a video or saved as images, or there could be multiple displays.
* If the display is known, mapping to the gamut of the display is a potent fingerprinting vector.

It may be that the target of mapping should be the [color space of the canvas](https://html.spec.whatwg.org/multipage/canvas.html#canvasrenderingcontext2dsettings). For the moment this is reasonable. 

When we start supporting float16 canvases, it could be less obvious. E.g, an sRGB canvas with float16 pixels can express an arbitrarily wide gamut, so gamut mapping to sRGB would impose undesirable restrictions.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10112 using your GitHub account


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

Received on Thursday, 21 March 2024 11:59:39 UTC