forced colors mode
A browser mode, turned on by settings such as Windows Contrast Themes, that replaces a page's colours with a small palette the user chose.
In more detail
In forced colors mode, author background and text colours, including those from CSS custom properties, are overridden with system colours. Backgrounds and shadows used to show boundaries vanish, so components need real borders or outlines. The forced-colors media query lets you adjust for it.
Related terms
- system colour — A CSS colour keyword, such as Canvas, CanvasText, ButtonText or Highlight, that takes its value from the user's operating system palette.
- forced-color-adjust — The CSS property that lets an element opt out of forced colors mode with forced-color-adjust: none.
- high-contrast theme — A theme with maximum difference between text, borders and backgrounds for people with low vision.
Taught in
- Dark Mode Strategies: System Preference, Class & High-Contrast — Design Systems & Component Engineering