[css-color-4] Need to specify intent for <canvas> and WebGL
An offshoot from https://github.com/w3c/csswg-drafts/issues/7610.
We probably need to spec what to do for gamut mapping
My intuition would be something like this (where 1 and 4 are already specified as such in the spec):
- DOM elements (incl. SVG): Relative colorimetric.
- Canvas: Relative colorimetric.
- WebGL: Perceptual.
- <img>, <video>, etc.: Perceptual. (Unless there is an ICC profile that says something else?)
The reasoning is that canvas is usually for 2D graphics and WebGL is usually for 3D graphics. I don't have very strong opinions here, we just need to figure out something. My hunch is that if an author is super-unhappy about this, they shouldn't be creating a WCG context without first checking that the display can handle it.
I'm not sure whether background-image: in CSS should be treated as 1 or 4. I could be swayed either way.
We also need to specify what happens when drawing with an out-of-gamut color onto a canvas; I would suppose “the same rules as everywhere else” (ie., relative colorimetric for drawing lines etc., perceptual for images).
@weinig @svgeesus