Re: [csswg-drafts] [css-color] Serializing color() values (#480)

The CSS Working Group just discussed `Serializing color() values`, and agreed to the following:

* `RESOLVED: color() functions, if they have a choice between percentage and number, they should use number`
* ``RESOLVED: the `color(lab ...)` function, like the rest of the color() values, are in the 0-1 (or 0% - 100%) range. And they serialize the same as other color() values (as a 0-1 number).``

<details><summary>The full IRC log of that discussion</summary>
&lt;stantonm> topic: Serializing color() values<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/480<br>
&lt;stantonm> chris: dean raised how does the color function get serialized<br>
&lt;stantonm> ... whats a good serialization, for all the new ones they need to be floats<br>
&lt;stantonm> ... any problems with that in OM<br>
&lt;stantonm> TabAtkins: if it's not int it will serialize property, as long as data model underneath is number<br>
&lt;stantonm> chris: for color you can use 0-1, or 0-100%<br>
&lt;stantonm> ... 0-1 was simpler<br>
&lt;stantonm> emilio: consistent with alpha<br>
&lt;stantonm> RESOLVED: color() functions, if they have a choice between percentage and number, they should use number<br>
&lt;stantonm> chris: lightness is a percent, how do we handle that specific one<br>
&lt;stantonm> TabAtkins: percentage and number equilivence is defined as 0-1 equals 0-100%<br>
&lt;stantonm> ... so we can just accept number<br>
&lt;stantonm> s/can/can't/<br>
&lt;stantonm> ... in the color function, just follow the rules - which is 0-1<br>
&lt;stantonm> fantasai: agree with tab<br>
&lt;stantonm> florian: for match function we take 0-100?<br>
&lt;stantonm> christ: eventually caved to just take percent<br>
&lt;stantonm> TabAtkins: could be this one color space takes 0-400, so doesn't matter<br>
&lt;stantonm> chris: some people use equipment that gives back percent<br>
&lt;stantonm> fantasai: adding the percent sign makes sense<br>
&lt;chris> s/gives back percent/gives back L in 0 to 100 range and no percent<br>
&lt;stantonm> TabAtkins: don't do the weird thing with lab and percentages (?)<br>
&lt;stantonm> chris: did it for rgb, so we argued it might make sense for lab<br>
&lt;stantonm> ... it's longer so not being used as much<br>
&lt;AmeliaBR> We already have RGB functions where percentages map to 0-255 in integers. Because that's the convention for that data type. If integer 0-100 is the convention for lab.<br>
&lt;AmeliaBR> ... maybe makes sense to follow.<br>
&lt;fantasai> in the color() function?<br>
&lt;AmeliaBR> Ummm… I don't know which syntaxes are allowed there.<br>
&lt;TabAtkins> Proposed Resolution: the `color(lab ...)` function, like the rest of the color() values, are in the 0-1 (or 0% - 100%) range. And they serialize the same as other color() values (as a 0-1 number).<br>
&lt;stantonm> RESOLVED: the `color(lab ...)` function, like the rest of the color() values, are in the 0-1 (or 0% - 100%) range. And they serialize the same as other color() values (as a 0-1 number).<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/480#issuecomment-577747387 using your GitHub account

Received on Thursday, 23 January 2020 16:03:09 UTC