- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 04 Mar 2021 00:56:08 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `More clarity around the percentage in color-mix()`, and agreed to the following:
* `RESOLVED: color-mix(<metadata>, <color-option>#{2}), where <color-option> = <color> && <percentage>?`
<details><summary>The full IRC log of that discussion</summary>
<Rossen_> Topic: More clarity around the percentage in color-mix()<br>
<Rossen_> github: https://github.com/w3c/csswg-drafts/issues/6064<br>
<TabAtkins> gradients use "to" because it disambiguates whether the gradient comes *from* that direction or goes *to* that direction (and we flipped back and forth during dev, so there's no obvious answer).<br>
<fantasai> miriam: In the middle space, single percentage value, and spec was conflicted on what that refers to<br>
<fantasai> miriam: is it percentage color, or distance to second color<br>
<chris> q+<br>
<fantasai> miriam: or percentage of second color<br>
<fantasai> miriam: spec disagreed with itself<br>
<TabAtkins> gradients use "at" to separate the <position> from the possibly-preceding <length>{1,2}<br>
<fantasai> miriam: with commas, would be nice to do percentage in either color<br>
<leaverou> note: the spec has since been fixed and does not disagree with itself anymore :)<br>
<fantasai> miriam: so if you put in first color refers to weight of that color, second is weight of second color<br>
<Rossen_> q?<br>
<leaverou> q+<br>
<fantasai> miriam: would have to decide what to do if 2 percentages are specified<br>
<fantasai> miriam: SASS functions confusing as well, never clear to me which the percent refers to<br>
<TabAtkins> q+<br>
<Rossen_> ack chris<br>
<fantasai> chris: My understanding was % is % of that color, and all examples (there were more examples before)<br>
<fantasai> chris: there was just one sentence that was off, and Adam fixed ti<br>
<fantasai> chris: Seems clear it's a % of that color, not along a blend between the two colors<br>
<fantasai> chris: the color that it's next to<br>
<fantasai> leaverou: mixing paints, makes sense % of first color<br>
<fantasai> chris: ... that's confusign<br>
<fantasai> chris: if % don't add up, scale to add to 100%<br>
<fantasai> chris: does that make sense?<br>
<fantasai> miriam: So % goes with a color between the commas, that makes sense to me<br>
<fantasai> miriam: so % can be applied to either color, and can put it in one or both<br>
<fantasai> leaverou: Should allow for ...<br>
<fantasai> leaverou: and scale accordingly<br>
<fantasai> chris: Have that in HWB, if too high scale it back<br>
<Rossen_> ack leaverou<br>
<fantasai> TabAtkins: I think whichever syntax we go with, should be consistent between color-mix() and cross-fade()<br>
<fantasai> +1<br>
<fantasai> TabAtkins: cross-fade() matches up with what miriam suggests<br>
<fantasai> TabAtkins: can add % with any of the images<br>
<fantasai> TabAtkins: whichever one, if omitted, it's just 100% - [sum]<br>
<fantasai> TabAtkins: if don't add up to 100%, we fill in the remainder with a transparent image<br>
<Rossen_> ack TabAtkins<br>
<fantasai> TabAtkins: idk if we want to do with colors<br>
<chris> prefer a rebalance like HWB<br>
<fantasai> leaverou: 3-way mixes are confusing, too many ways to do it<br>
<fantasai> TabAtkins: I agree with reasoning for not doing 3-color mixes, but adding in transparency doesn't suffer from same confusion issues<br>
<fantasai> TabAtkins: not strong on either, but greater consistency with cross-fade() would be good<br>
<Rossen_> q?<br>
<TabAtkins> chris, note that HWB does *not* rebalance for <100% sum<br>
<TabAtkins> there it takes the remainder from the pure hue<br>
<TabAtkins> >100% causing rescaling is uncontroversial and common between all the functions, yes<br>
<leaverou> q+<br>
<fantasai> Rossen_: Can someone summarize the proposed resolution?<br>
<fantasai> leaverou: Before we summarize, one last point<br>
<TabAtkins> Proposed new grammar: color-mix(<metadata>, <color-option>#{2}), where <color-option> = <color> && <percentage>?<br>
<fantasai> leaverou: if we handle percentages < 100% by mixing with transparent, it has special interpolation handling so [????]<br>
<leaverou> s/[????]/we don't want to do that/<br>
<chris> q+ for the negative percentages<br>
<fantasai> TabAtkins: Ignoring the < 100% sum and take it to the issue, think we can resolve on the rest<br>
<argyle> `color-mix(in lch red 80%, blue)` also `color-mix(in lch, red, blue 80%)`<br>
<argyle> `color-mix(in lch, red 80%, blue)` also `color-mix(in lch, red, blue 80%)`<br>
<fantasai> TabAtkins: proposal above<br>
<fantasai> TabAtkins: if above 100%, rescale to add to 100%<br>
<TabAtkins> if below 100%, figure out in issue<br>
<fantasai> Rossen_: any objections?<br>
<fantasai> RESOLVED: color-mix(<metadata>, <color-option>#{2}), where <color-option> = <color> && <percentage>?<br>
</details>
--
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6064#issuecomment-790197866 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 4 March 2021 00:56:12 UTC