← Back to release summary

CSS Relative Color Syntax (RCS)

Category
Graphics
Type
Chromium catches up
Status
Enabled by default (Chrome 119)
Intent stage
None

WPT details: https://wpt.fyi/results/css/css-color/parsing/color-computed-relative-color.html https://wpt.fyi/results/css/css-color/parsing/color-invalid-relative-color.html https://wpt.fyi/results/css/css-color/parsing/color-valid-relative-color.html

Summary

The relative color syntax allows developers to define colors by modifying the parameters of other colors. For example: oklab(from magenta calc(l * 0.8) a b); Will result in an oklab magenta that is 80% as light. https://www.w3.org/TR/css-color-5/#relative-colors

Standards & signals

Ecosystem

View on chromestatus.com