Re: [csswg-drafts] [css-color-5] color-extract() function to extract individual color components (#6937)

The CSS Working Group just discussed `CSS Color 5, color-extract()`, and agreed to the following:

* `RESOLVED: Add color-extract() to Color 5 and continue work`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: CSS Color 5, color-extract()<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/6937<br>
&lt;fantasai> lea: Had discussions in the past, especially after Web Almanac<br>
&lt;fantasai> lea: when we saw that authors are often generating color variations by extracting color components and doing math on them<br>
&lt;fantasai> lea: we have relative color syntax for most of these use cases, already implemented in Safari<br>
&lt;fantasai> lea: however, don't have a way to combine components from multiple colors<br>
&lt;fantasai> lea: these are much more rare, but they do eist<br>
&lt;fantasai> lea: there was even a WG resolution for how to express a thing, which required combining output of one color and components of other color<br>
&lt;fantasai> lea: color-mix() used to be able to to do that in an awkward way, which we removed<br>
&lt;TabAtkins> (We ended up doing something different, but yeah it was part of Forced Colors Mode.)<br>
&lt;chris> q+<br>
&lt;fantasai> lea: at first Chris and I were thining to add e.g. lch-lightness() etc on a use-case basis<br>
&lt;fantasai> lea: but now thinking why not have a generic extraction function<br>
&lt;fantasai> lea: extra effort in terms of spec and implementation shouldn't be too high<br>
&lt;fantasai> lea: main argument is it's very verbose, but for common cases have other methods<br>
&lt;fantasai> lea: so I think the extra verbosity is OK<br>
&lt;fantasai> lea: and Tab already said he agrees with the idea in the issue thread<br>
&lt;smfr> q+<br>
&lt;Rossen_> ack chris<br>
&lt;fantasai> chris: I think it's verbose, but it makes sense and is clear<br>
&lt;fantasai> chris: i like re-using existing things like color space and components, etc.<br>
&lt;TabAtkins> yeah +1 to it, and i'm happy with how it slots into the color() component naming stuff<br>
&lt;fantasai> chris: Lea, you have component there, in Colro 5 have custom components for custom spaces , could you re-use?<br>
&lt;fantasai> lea: yes, could re-use<br>
&lt;fantasai> chris: great, I like the generality<br>
&lt;Rossen_> ack smfr<br>
&lt;fantasai> smfr: I'm trying to figure out is this an API for converting APIs between color spaces?<br>
&lt;fantasai> lea: no, this is an API for doing custom math with color components, that is more general than relative color syntax<br>
&lt;fantasai> chris: No if you want to convert color spaces, can already do that and it's very simple. But it gives you a complet color<br>
&lt;fantasai> smfr: if conversion under the hood and picking out components<br>
&lt;fantasai> smfr: should this just be a typed OM thing?<br>
&lt;fantasai> lea: JS API?<br>
&lt;fantasai> smfr: oh, this is a CSS API<br>
&lt;fantasai> smfr: I need to read the issue<br>
&lt;Rossen_> q?<br>
&lt;fantasai> chris: I agree the Color API should have the same functionality<br>
&lt;dino> q+<br>
&lt;fantasai> dino: Would be great to see an exampe in the gh issue of actually doing a design or palette with the color-extract() syntax<br>
&lt;miriam> +1 I like this proposal, and would use it<br>
&lt;florian_irc> fantasai: we should come back to this next week after people have time to read and think some more<br>
&lt;fantasai> fantasai: Seems like people need more time to review, maybe revisit next week. Seems likely to have support though.<br>
&lt;lea> +1<br>
&lt;fantasai> Rossen_: Seems we might be able to record a resolution today actually<br>
&lt;astearns> proposed resolution: accept the work in color-5<br>
&lt;fantasai> Rossen_: Any objectionsS?<br>
&lt;chris> syntax actually looks good to me, and tab already said he liked it<br>
&lt;fantasai> RESOLVED: Add color-extract() to Color 5 and continue work<br>
</details>


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


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

Received on Wednesday, 12 January 2022 17:56:17 UTC