Start a project

Tool 38 of 194 · Accessibility

Forced Colours Mode Previewer

See how your page looks to people using Windows contrast themes, find what disappears and get the forced-colors CSS that brings it back.

Forced Colours Mode Previewer

HTML and CSS

The preview is a simulation of the CSS Color Adjust rules. For the real thing, use Windows contrast themes or Chrome DevTools: Rendering, Emulate CSS media feature forced-colors.

Preview

As written

Forced colours

What disappears

ProblemWhereWhy and how to fix
Suggested forced-colors CSS
The simulation stylesheet

01

What it does

Shows your HTML side by side as written and in simulated forced colours mode, and lists the icons, borders, focus rings and states that disappear, with fixes.

  • Side-by-side preview: as written and with forced colours applied
  • Windows High Contrast Black and White palettes, or your browser's own system colours
  • Simulates the CSS Color Adjust rules: system colours, shadows removed, gradients dropped
  • Finds focus rings drawn with box-shadow, masked icons, shadow borders and colour-only states

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

Two previews, a problem list and forced-colors CSS, with a Copy and a Download button on every result.

  • Accessibility
  • Forced colors
  • High contrast
  • CSS

Why it matters

Forced colours mode, known on Windows as contrast themes and before that as high contrast mode, replaces every colour on the page with a small palette the user picked. People with low vision and some with migraines or dyslexia rely on it. It's good at keeping text readable, but it removes box shadows and background gradients and paints every background the same, so anything that relies on them can vanish: focus rings drawn with box-shadow, icons drawn with CSS masks, buttons that only had a background colour, and selected tabs that only changed colour.

This previewer renders your HTML and CSS in a sandboxed frame twice, once as written and once with a stylesheet that applies the forced colours rules from the CSS Color Adjust specification, using the classic Windows High Contrast palettes or your browser's own system colours. Alongside, a pass over your CSS lists the patterns that usually break and writes the @media (forced-colors: active) rules to fix them. It's a close simulation; confirm in Windows or with DevTools' forced-colors emulation.

How to use it

  1. Paste a component's HTML and CSS.
  2. Compare the two previews and pick a theme.
  3. Read the problem list: focus and icon problems first.
  4. Copy the forced-colors CSS and test the result in a real contrast theme.

FAQ

How do I test forced colours for real?

On Windows, open Settings, Accessibility, Contrast themes. In Chrome or Edge DevTools, open Rendering and set Emulate CSS media feature forced-colors to active.

Why use a transparent border?

In forced colours every border is painted in the text colour, even a transparent one. A 1px transparent border is invisible normally and gives buttons and cards an edge in forced colours.

Should I use forced-color-adjust: none?

Only where colour is the content, such as a colour swatch or a chart key. Elsewhere it overrides the colours the visitor chose.

Is my code sent anywhere?

No. The preview runs in a sandboxed frame in your browser.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk