W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2017

[csswg-drafts] [css-color-4] When do color space conversions happen?

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Sun, 08 Jan 2017 03:57:00 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-199401241-1483847819-sysbot+gh@w3.org>
frivoal has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-color-4] When do color space conversions happen? ==
Maybe I missed something, but as far as I can tell css-color-4 is 
silent about whether converting colors expressed in different 
profiles/spaces (using `color()`, `lab()`, `lch()`, or `gray()`) to 
the working color space  is something that happens at computed value 
time, used value time, or some other time, and how that affects 
serialization.

Given that for color properties, the resolved value returned by 
getComputedStyle() is the used value, the serialization should be the 
same if the conversion happens at computed or used value time: the 
converted value. However, when the working color space is (for 
instance) sRGB, if we expect `color(rec2020 0 255 127)` to serialize 
as `color(rec2020 0 255 127)` rather than as `rgb( x, y, z)` (or 
`color(srgb x y z)`) then supposedly, the conversion must happen after
 used value time.

On the other hand, if the conversion is handled after computed value 
time,  presumably this means we cannot animate from `color(foo 1 2 3)`
 to `color(bar 4 5 6)`.

I think that being able to animate between all sorts of colors is more
 valuable than a more literal serialization (and we already do all 
sorts of changes to the computed value anyway), so I'd lead towards 
doing the conversion at computed value time.

I'm guessing this is the intent of the spec already, but I have not 
found a clear statement one way or the other.

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/867 using your GitHub 
account
Received on Sunday, 8 January 2017 03:57:06 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:07 UTC