Design System Problems

Forced Colors Mode

January 15, 2026 • 5 min read

Forced Colors Mode

Forced colors mode is a browser state where user color preferences override author-defined colors. The CSS forced-colors media query enables targeted adjustments for interfaces to work correctly when users enable high contrast features.

What Is Forced Colors Mode

Forced colors mode activates when operating system accessibility features like Windows High Contrast override application colors. In this mode, browsers apply user-selected colors instead of CSS-defined colors.

The forced-colors CSS media feature detects this state:

This standardized media feature replaces older vendor-specific queries like -ms-high-contrast, though supporting both ensures broader browser coverage.

Understanding forced colors mode helps design systems create components that remain functional and understandable regardless of color scheme.

How Forced Colors Mode Works

When forced colors mode is active, browsers override:

The override respects system color keywords that map to user preferences. Using these keywords in forced-colors mode ensures colors match what the user expects:

The forced-color-adjust property controls whether elements receive forced colors treatment:

Use forced-color-adjust: none sparingly, typically for images or elements where preserving colors is essential:

This allows brand logos or specific images to maintain their colors while the rest of the interface adapts.

Key Considerations

Common Questions

What system color keywords are available?

Common system color keywords include:

These keywords resolve to the user’s chosen colors in forced colors mode.

When should forced-color-adjust: none be used?

forced-color-adjust: none should be used sparingly for elements where color conveys essential meaning that system colors cannot replace:

Do not use it broadly, as this defeats the purpose of forced colors mode for users who need it.

How do gradients and shadows behave?

Gradients typically collapse to flat system colors or become transparent in forced colors mode. Complex gradient-based designs may need border-based alternatives:

Shadows often disappear. If shadows provide depth cues or visual hierarchy, consider adding borders in forced colors mode.

Summary

Forced colors mode detects when browsers override colors for accessibility. Using the forced-colors media query, system color keywords, and careful use of forced-color-adjust creates interfaces that remain functional when users enable high contrast features.

Buoy scans your codebase for design system inconsistencies before they ship

Detect Design Drift Free
← Back to Accessibility Compliance