Re: [csswg-drafts] [css-color-4] Allow out-of-gamut HSL/HWB colors (previously "Move gamut mapping to a future spec") (#8444)

The CSS Working Group just discussed `[css-color-4] Allow out-of-gamut HSL/HWB colors (previously "Move gamut mapping to a future spec")`, and agreed to the following:

* `RESOLVED: Make color-mix() and RCS using rgb, hsl and hwb return round-trippable, unbounded results in color(srgb ...)`

<details><summary>The full IRC log of that discussion</summary>
&lt;bramus> chris: for round tripping we will allow …. that is not up for discussion but it does not work.<br>
&lt;bramus> chris: can we relax that?<br>
&lt;Rossen_> https://github.com/w3c/csswg-drafts/issues/8444#issuecomment-1518663196<br>
&lt;bramus> chris: proposal is that instead we return color[srgb] which allows the round tripping<br>
&lt;bramus> chris: is a breaking change in WPT though<br>
&lt;bramus> chris: did not hear any negative feedback so far<br>
&lt;emilio> q+<br>
&lt;bramus> Rossen_: opinions other than https://github.com/w3c/csswg-drafts/issues/8444#issuecomment-1518663196?<br>
&lt;bramus> iank_: not sure anyone from google has seen this<br>
&lt;bramus> chris: it is a google proposal<br>
&lt;bramus> iank_: ah, missed that<br>
&lt;Rossen_> ack emilio<br>
&lt;bramus> emilio: it seems reasonable, but concerned about color-mix but that has shipped in Safari and is implemented in Chrome<br>
&lt;argyle> shipped, test it here https://color-mix.style<br>
&lt;bramus> emilio: for color-mix result depens on the colors being legacy ones or not?<br>
&lt;bramus> emilio: maybe we can do "if the colors are relative"?<br>
&lt;bramus> emilio: we return legacy rbg if you mix legacy rbg<br>
&lt;bramus> chris: problem is if you mix in HSL and get OOG color, it does clamping<br>
&lt;bramus> emilio: but only happens if you mix legacy colors in HSL?<br>
&lt;bramus> chris: I believe so, yes<br>
&lt;bramus> emilio: I guess not clamping would be … if we can get away with returning color() it might be OK<br>
&lt;bramus> chris: we have to say what happens in the spec<br>
&lt;bramus> emilio: no strong opinions as long as its consistent<br>
&lt;bramus> Rossen_: the more we prolong this, it will get worse<br>
&lt;bramus> Rossen_: any objections to chris’s proposal?<br>
&lt;bramus> emilio: only in hsl?<br>
&lt;bramus> chris: rgb, hsl, and hwb<br>
&lt;bramus> chris: inputs to mix in HSL can be anything<br>
&lt;bramus> chris: if you mix in hsl, output needs to be hsl, and wil serialize as rgb<br>
&lt;bramus> emilio: I thought we serialize as a color fn<br>
&lt;bramus> Rossen_: let’s move on<br>
&lt;TabAtkins> I think you've gotten pretty confused Emilio - `color-mix(hsl ...)` currently will resolve to an HSL color (serialized with `hsl()`).<br>
&lt;bramus> Rossen_: proposed resolution: make color-mix() and RCS using rgb, hsl and hwb return round-trippable, unbounded results in color(srgb ...)<br>
&lt;emilio> TabAtkins: oh, I thought we didn't serialize those as hsl(...) at all<br>
&lt;TabAtkins> once they're resolved to a definite color they gotta be serialized as *something*<br>
&lt;bramus> RESOLVED: Make color-mix() and RCS using rgb, hsl and hwb return round-trippable, unbounded results in color(srgb ...)<br>
&lt;bramus> Rossen_: might consider Scroll-driven breakout<br>
&lt;bramus> Rossen_: otherwise can start with scroll-animations next week<br>
&lt;chris> yeah and they get serialized as legacy rgb(r,g,b)<br>
&lt;emilio> ISTR at the point I wrote the gecko issue I wrote it so that we serialize in color(srgb...)<br>
&lt;emilio> But that changed apparently, ok<br>
</details>


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


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

Received on Wednesday, 10 May 2023 17:04:58 UTC