Re: [csswg-drafts] [css-color-5] Behavior of `none` in relative color syntax (#10151)

The CSS Working Group just discussed ``[css-color-5] Behavior of `none` in relative color syntax``, and agreed to the following:

* ``RESOLVED: `none` in calculations is converted to 0 when converting a color to a different color space. It is still preserved otherwise, and is still preserved when used as the whole value of a component.``

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> lea: We have this concept of "none", which defines a missing color component<br>
&lt;emilio> lea, can you use a mic?<br>
&lt;fantasai> lea: when you interpolate with another color, and the other color has an actual number<br>
&lt;fantasai> lea: then that component will take its value from the other color<br>
&lt;fantasai> lea: This concept started for representing achromatic colors<br>
&lt;fantasai> lea: but it also allows specifying parts of color and adding in by interpolation, which is useful<br>
&lt;fantasai> lea: we recently resolved to preserve none in calculations<br>
&lt;fantasai> lea: previously computed to zero, in order to avoid exposing color space math<br>
&lt;ChrisL> q+ to ask if the edits suggested in https://github.com/w3c/csswg-drafts/issues/10151#issuecomment-2140647146 are sufficient, or is more needed<br>
&lt;fantasai> lea: but implementers interpreted as "any time you do any math, compute to zero" which isn't needed<br>
&lt;fantasai> lea: in April we resolved to preserve "none" in calculations<br>
&lt;astearns> ack lea<br>
&lt;fserb> +1<br>
&lt;fantasai> ChrisL: Suggest we adopt changes proposed by Romain Menke<br>
&lt;fantasai> ChrisL: idk if we need more changes to close the issue<br>
&lt;fantasai> -> https://github.com/w3c/csswg-drafts/issues/10151#issuecomment-2140647146<br>
&lt;fantasai> lea: that's a problem from a different issue<br>
&lt;lea> https://github.com/w3c/csswg-drafts/issues/10211#issuecomment-2083735046<br>
&lt;fantasai> lea: right now we have concept of analogous color spaces<br>
&lt;fantasai> lea: can convert to a different color space, can convert none<br>
&lt;fantasai> lea: e.g. lch and oklch, a lightness of none will be preserved<br>
&lt;fantasai> lea: you make the none's zeroes, you convert to other color space, you plug the none's back to the alogous components<br>
&lt;fantasai> lea: but wouldn't work if you preserve calculations if different scales<br>
&lt;fantasai> lea: e.g. rgb and color(rgb)<br>
&lt;fantasai> lea: in color function range is 0-1<br>
&lt;fantasai> lea: in rgb the range is 0-255<br>
&lt;fantasai> lea: so adding 50 to rgb color is 20%, but srgb using color function is nonsensical<br>
&lt;fantasai> lea: I think that should be allowed<br>
&lt;fantasai> lea: not sure what the solution is here<br>
&lt;fantasai> lea: but preserving calculations when converting to differnet color space is iffy<br>
&lt;fantasai> lea: preserve for other operations, but maybe not converting colors<br>
&lt;astearns> ack ChrisL<br>
&lt;Zakim> ChrisL, you wanted to ask if the edits suggested in https://github.com/w3c/csswg-drafts/issues/10151#issuecomment-2140647146 are sufficient, or is more needed<br>
&lt;fantasai> lea: either preserve none as a whole or drop ti<br>
&lt;fantasai> ChrisL: I'm not sure<br>
&lt;fantasai> ChrisL: I think preserving none is the right thing, but I'm not sufficiently sure<br>
&lt;fantasai> lea: when converting color spcaes, numbers mean different thing<br>
&lt;fantasai> lea: having a whole component as none made sense, but calculations if converting it's ...<br>
&lt;fantasai> lea: anything we come up with would be way too weird<br>
&lt;miriam> +1 preserve none unless converting spaces<br>
&lt;emilio> nope<br>
&lt;fantasai> fserb: when crossing function boundaries where maybe stop making sense, you need to convert none<br>
&lt;fantasai> lea: agree, anythng else seems super weird<br>
&lt;fantasai> fserb: think about those boundaries and resolve at them<br>
&lt;lea> PROPOSED RESOLUTION: `none` in calculations is converted to 0 when converting a color to a different color space. It is still preserved otherwise, and is still preserved when used as the whole value of a component.<br>
&lt;lea> RESOLVED: `none` in calculations is converted to 0 when converting a color to a different color space. It is still preserved otherwise, and is still preserved when used as the whole value of a component.<br>
</details>


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


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

Received on Wednesday, 12 June 2024 11:10:25 UTC