coderef

Forced colorsBaseline · Widely available

The forced-colors CSS @media rule detects when a user has chosen to use a forced colors mode, also known as high-contrast mode, and the forced-color-adjust CSS property sets whether forced colors apply to an element.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 12, 2022. Widely available since Mar 12, 2025.

Browser support

DesktopChrome
1–88Not supported
89+Supportedsince Mar 2, 2021
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–88Not supported
89+Supportedsince Jun 1, 2021
Current: 157
Safari
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27
MobileChrome Android
18–88Not supported
89+Supportedsince Mar 2, 2021
Current: 155
Firefox Android
4–88Not supported
89+Supportedsince Jun 1, 2021
Current: 157
Safari iOS
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: forced-colors.

Feature detection

CSS · check before using
@supports (forced-color-adjust: initial) {
  /* styles that rely on forced-color-adjust */
}

/* or in JavaScript */
if (CSS.supports("forced-color-adjust", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (5). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
@media.forced-colors89798916898916
forced-color-adjust8979113✕89113✕
forced-color-adjust.auto8979113✕89113✕
forced-color-adjust.none8979113✕89113✕
forced-color-adjust.preserve-parent-color106106✕✕106✕✕