Reference · CSS
CSS color Modern color, with a way back.
Nine recipes for color in today’s CSS. Each one is the smallest useful piece of CSS for a real job, with the fallback an older browser keeps, a live example of both, support data with its review date, and a record of three engines running it.
- 01oklch()
- 02color-mix()
- 03Relative colors
- 04light-dark()
- 05Display P3
- 06Gradients in OKLCH
- 07accent-color
- 08contrast-color()
- 09Forced colors
- CSS recipes
- 9
- Support reviewed
- 11 October 2026
- Engines tested
- Chromium · Firefox · WebKit
The recipes
Nine jobs, nine pieces of CSS
Each card is drawn with its own recipe, so a browser without the feature shows the fallback right here.
-
01Widely available
oklch()
Author in OKLCH; every hex fallback matches
Chrome 111 · Firefox 113 · Safari 15.4
-
02Widely available
color-mix()
One brand color, every tint and hover
Chrome 111 · Firefox 113 · Safari 16.2
-
03Newly available
Relative colors
Derive states with oklch(from …)
Chrome 125 · Firefox 128 · Safari 18
-
-
05Widely available
Display P3
Richer color where the screen can show it
Chrome 111 · Firefox 113 · Safari 15
-
06Newly available
Gradients in OKLCH
Blue to yellow without the grey
Chrome 111 · Firefox 127 · Safari 16.2
-
07Limited availability
accent-color
Brand the native form controls
Chrome 93 · Firefox 92 · Safari 26.2
-
08Newly available
contrast-color()
Black or white, chosen by the browser
Chrome 147 · Firefox 146 · Safari 26
-
At a glance
Support across the core browsers
Support reviewed on against web-features 98723fd and browser-compat-data 3b28abe.
| Recipe | Baseline status | Chrome | Edge | Firefox | Safari | Your browser |
|---|---|---|---|---|---|---|
| oklch() | Widely available | 111 | 111 | 113 | 15.4 | YesNo |
| color-mix() | Widely available | 111 | 111 | 113 | 16.2 | YesNo |
| Relative colors | Newly available | 125 | 125 | 128 | 18 | YesNo |
| light-dark() | Newly available | 123 | 123 | 120 | 17.5 | YesNo |
| Display P3 | Widely available | 111 | 111 | 113 | 15 | YesNo |
| Gradients in OKLCH | Newly available | 111 | 111 | 127 | 16.2 | YesNo |
| accent-color | Limited availability | 93 | 93 | 92 | 26.2 | YesNo |
| contrast-color() | Newly available | 147 | 147 | 146 | 26 | YesNo |
| Forced colors | Widely available | 89 | 79 | 89 | 16 | YesNo |
- Widely availableEvery core browser, for 30 months or more
- Newly availableEvery core browser, recently
- Limited availabilityNot yet in every core browser
Method
How each recipe is checked
Support data has a date. Versions and Baseline status come from the web-features project and MDN’s browser-compat-data, read at a fixed commit and printed with the day they were reviewed.
Fallbacks are computed. Every fallback color is worked out with this site’s color engine from the modern value, so the two match wherever sRGB can show the color.
The fallback is shown, not described. The right-hand example renders the same CSS with the feature’s syntax made unknown, so the browser drops exactly what an older browser would.
Three engines run it. Chromium, Firefox and WebKit each render both versions; the colors are read back from the screen and compared with the expected values.
Run on in Chromium 147.0.7727.15, Firefox 148.0.2 and WebKit 26.4, with Playwright.
Background
The ideas behind the recipes
Read more
References
Go to the source
- CSS Color Module Level 4www.w3.org
- CSS Color Module Level 5www.w3.org
- CSS Color Adjustment Module Level 1www.w3.org
- web-features: Baselineweb-platform-dx.github.io
- web-features at 98723fdgithub.com
- MDN browser-compat-data at 3b28abegithub.com