Contact emails
[email protected]

Explainer
https://github.com/w3c/csswg-drafts/issues/11530
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix


Specification
https://drafts.csswg.org/css-color-5/#color-mix


Summary
The CSS color-mix() function accepts one or more colors, instead of exactly 
two. Each color can have an optional percentage, and the colors are mixed in 
order, so several colors can be blended in a single function, for example 
color-mix(in oklch, red, green 20%, blue). Before, this needed nested 
color-mix() calls, whose percentages are hard to work out. A single color, as 
in color-mix(in hsl, teal), converts that color to the interpolation color 
space. As with two colors, percentages that add up to less than 100% make the 
result partially transparent.


Blink component
Blink>CSS


Web Feature ID
color-mix-variadic


Motivation
Mixing more than two colors needs nested `color-mix()` calls today. Each inner 
mix becomes one color of the outer mix, so the percentage of every color has to 
be worked out by hand: an equal mix of three colors is `color-mix(in srgb, 
color-mix(in srgb, red, green), blue 33.3333%)` instead of `color-mix(in srgb, 
red, green, blue)`. The CSSWG resolved to let `color-mix()` take any number of 
colors (issue #11530). The spec also allows a single color, which converts it 
to the interpolation color space (issue #12234). Firefox and Safari ship both 
forms, so this closes an interop gap.


Initial public proposal
No information provided


Goals for experimentation
None




Tracking bug
https://issues.chromium.org/issues/407806416


Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5009529854099456?gate=5082953662201856


This intent message was generated by Chrome Platform Status.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6af4c083.7772a632.11fdae.0a78.GAE%40google.com.

Reply via email to