Re: [w3ctag/design-reviews] CSS color-mix function (#526)

Shipping this in blink soon:

https://groups.google.com/a/chromium.org/g/blink-dev/c/r0QATT8-kOw

Our implementation matches what is described [here](https://www.w3.org/TR/css-color-5/#color-mix). So syntax is slightly different than described in this issue. Color spaces get the "in" keyword and a comma precedes the first color:

`color-mix() = color-mix( <color-interpolation-method> , [ <color> && <percentage [0,100]>? ]#{2})`
i.e. `color-mix(in lch, red 40%, yellow)`

This matches what has been implemented in webkit and gecko. We aimed to have these tests in WPT passing:
https://github.com/web-platform-tests/wpt/blob/master/css/css-color/parsing/color-computed-color-mix-function.html
https://github.com/web-platform-tests/wpt/blob/master/css/css-color/parsing/color-invalid-color-mix-function.html
https://github.com/web-platform-tests/wpt/blob/master/css/css-color/parsing/color-valid-color-mix-function.html

And to pass all tests on wpt interop: [wpt.fyi/results/css/css-color](wpt.fyi/results/css/css-color)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/526#issuecomment-1292328043
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/526/1292328043@github.com>

Received on Wednesday, 26 October 2022 16:50:06 UTC