- From: Chris Lilley via GitHub <sysbot+gh@w3.org>
- Date: Wed, 09 Dec 2020 12:35:54 +0000
- To: public-css-archive@w3.org
To catch up on this long-standing issue: There cannot be a per-document or even per-element `working colorspace` because different options require calculations to be done in different colorspaces: - [color interpolation is now defined in CSS Color 5](https://drafts.csswg.org/css-color-5/#interpolation) and uses Lab by default, but individual properties or functions can override this - [`color-mix()`](https://drafts.csswg.org/css-color-5/#color-mix) overrides the interpolation default to LCH, but has syntax to specify a different colorspace - [compositing](https://drafts.fxtf.org/compositing-1/) currently uses gamma-encodes sRGB (which is terrible, but Web compatible) and will need to be upgraded to at minimum allow a linear-light option. CIE XYZ is the obvious choice here. Implementations can calculate in another linear-light space, like linear-light display-p3, and get the same result modulo gamut clipping. See https://github.com/w3c/csswg-drafts/issues/5669 - [gradients currently use alpha-premultiplied gamma-encoded sRGB](https://www.w3.org/TR/css-images-3/#coloring-gradient-line) for Web compat, and will need to be upgraded to allow a perceptually uniform (still alpha premultiplied) option. Lab and LCH are the obvious candidates there. CSS Color 5 defines [alpha-premultiplication for all color spaces](https://drafts.csswg.org/css-color-5/#interpolation-alpha) Also the need for a working colorspace for serialization was removed [serialized value is in the colorspace it was declared](https://drafts.csswg.org/css-color-4/Overview.html#serializing-color-values). -- GitHub Notification of comment by svgeesus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/300#issuecomment-741743420 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 9 December 2020 12:35:57 UTC