Intent to prototype: CSS color-mix() function.

Skip to first unread message

Emilio Cobos Álvarez

Feb 26, 2021, 9:09:28 PM2/26/21
to Mozilla


In bug 1695376, if all goes well, I plan to land a basic version of the
color-mix() function. This is a trimmed down version of the spec (link

Firefox engineers requested this, and I also think this minimal version
is super-useful on its own, without being blocked on all the HDR color
stuff that we haven't implemented yet.



Note that I'm only implementing the basic color-mix syntax without
per-color-channel adjustments (so just a set of colors and weights), and
I obviously haven't implemented the lab / lch / etc bits because we
don't support those colors yet.

Platform coverage: all

Preference: layout.css.color-mix.enabled

DevTools bug:

Other browsers: Other browsers don't support this yet, to my knowledge.
Safari has started implementing some of the CSS colors for other color
spaces, though not sure if they ship that.

web-platform-tests: I added some basic WPTs that check parsing and that
the interpolation matches the one from CSS animations. More tests are
needed before shipping something like this of course.
Reply all
Reply to author
0 new messages