color-schemeBaseline · Widely available
The color-scheme CSS property sets which color schemes (light or dark) an element uses and may prevent automatic dark mode adjustments by the browser.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Feb 3, 2022. Widely available since Aug 3, 2024.
Browser support
DesktopChrome
1–97Not supported
98+Supportedsince Feb 1, 2022
Current: 155Edge
12–97Not supported
98+Supportedsince Feb 3, 2022
Current: 154Firefox
1–95Not supported
96+Supportedsince Jan 11, 2022
Current: 157Safari
1–12.1Not supported
13+Supportedsince Sep 19, 2019
Current: 27MobileChrome Android
18–97Not supported
98+Supportedsince Feb 1, 2022
Current: 155Firefox Android
4–95Not supported
96+Supportedsince Jan 11, 2022
Current: 157Safari iOS
1–12.2Not supported
13+Supportedsince Sep 19, 2019
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: color-scheme.
Feature detection
CSS · check before using
@supports (color-scheme: initial) {
/* styles that rely on color-scheme */
}
/* or in JavaScript */
if (CSS.supports("color-scheme", "initial")) {
// use it
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| color-scheme | 81 | 81 | 96 | 13 | 81 | 96 | 13 |
| color-scheme.dark | 81 | 81 | 96 | 13 | 81 | 96 | 13 |
| color-scheme.light | 81 | 81 | 96 | 13 | 81 | 96 | 13 |
| color-scheme.normal | 81 | 81 | 96 | 13 | 81 | 96 | 13 |
| color-scheme.only | 98 | 98 | 96 | 13 | 98 | 96 | 13 |
| meta.name.color-scheme | 81 | 81 | 96 | 12.1 | 81 | 96 | 12.2 |