Implement color() function from CSS colors level 4
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
People
(Reporter: ntim, Unassigned)
References
(Blocks 10 open bugs, )
Details
(Keywords: dev-doc-needed, parity-safari)
The spec is probably too young, but this is really useful to have, especially the color adjustment functions that are really useful with CSS variables. Spec : http://dev.w3.org/csswg/css-color-4/
Comment 1•7 years ago
|
||
Scoping this bug down to just the color() function, as we'll want to make individual decisions about different parts of the spec.
Comment 2•6 years ago
|
||
Apparently WebKit recently added support for color() syntax, and it will probably available in STP 18, around the end of November. https://twitter.com/grorgwork/status/796809159119253505
Updated•5 years ago
|
Comment 3•5 years ago
|
||
I can take a look at this color() functions. (I think Bug 1352754 is the same as this one.)
Comment 4•5 years ago
|
||
(In reply to Boris Chiou [:boris] from comment #3) > I can take a look at this color() functions. (I think Bug 1352754 is the > same as this one.) But I need to finish stylo CSS transition first, so please feel free to take this before I start to work.
Updated•5 years ago
|
Comment 6•4 years ago
|
||
Looks like the color-adjustment functionality of color() has been removed from the spec. color() is now just for specifying colors in a particular color space.
Updated•3 years ago
|
Webkit has added support for Display-P3 color back in 2016 for the CSS Color Module Level 4.
https://webkit.org/blog/10042/wide-gamut-color-in-css-with-display-p3/
Does Mozilla also support this?
Comment 8•2 years ago
•
|
||
(In reply to Nomis101 from comment #7)
Webkit has added support for Display-P3 color back in 2016 for the CSS Color Module Level 4.
https://webkit.org/blog/10042/wide-gamut-color-in-css-with-display-p3/
Does Mozilla also support this?
No. I think Mozilla doesn't support this yet (wpt.fyi, parser).
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 9•9 months ago
|
||
Unassign myself now because I'm not planning to do this in this half year.
Comment 10•6 months ago
|
||
The @color-profile part of the color() function was recently moved by CSSWG decision from CSS Color 4 to CSS Color 5.
So color() in CSS Color 4 is now just the predefined rgb spaces like display-p3, rec2020 and so on. It has been implemented in WebKit (and shipped in Safari 15, updating their previous minimal implementation which was display-p3 only).
Hopefully that change scopes it into a more achievable goal for Gecko?
Color modification (relative color syntax, color-mix()) is also in Color 5.
Updated•2 months ago
|
Description
•