You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-color-5] Serialization of origin colors does not match WPT or implementations #14950
§ Serializing Origin Colors disagrees with WPT, and mostly with what browsers do, about how the declared value of an absolute color used as an origin color is serialized.
The spec says to keep the color function and serialize its components as specified, in modern syntax, with percentages staying percentages and no clamping. The tests expect these origin colors to be normalized, much as they would be outside a relative color:
The tests also contradict the spec examples, which keep an hsl() origin color as hsl(), including out-of-range values:
hsl(from hsl(127.9 302% 25.33%) h s l)
On wpt.fyi (experimental runs of 4 December 2026), Chrome 161 and Safari 257 preview pass the subtests in both files which have these origin colors. Firefox 164 does too, apart from some where an rgb() origin color contains none.
The spec text was adopted by resolution in #10328, which is still open; a comment there noted that some tests had not been updated.
Options:
Keep the spec, update the tests, and ask implementations to change.
Change the spec to match implementations.
See also #14949, about the channel and alpha arguments of the relative color itself, and #10328, about serializing nested colors in their most precision saving form
Activity