Skip to Content
Platform.Ontology

forced-colors

True when Windows High Contrast or similar forces a palette.

Gets silentlyScreen and windowsCSS media featuresWeb browsersWhen the page loadsWhile you use it

In one line

Can tell if Windows High Contrast or a similar mode is forcing your colors

True when Windows High Contrast or similar forces a palette.

Strong accessibility signal (low vision or migraine users). Mostly Windows contrast themes. A tiny share of users, hence very identifying for those who use it.

What it can and can't do

What the user does: Nothing. It happens when the page loads.

It can

  • Check whether forced colors are on
  • Change its design so text stays easy to see
  • Add the answer to a browser fingerprint

It cannot

  • Tell why you turned it on, though it can hint at a vision need
  • Change your color settings
  • Get an answer in Safari on Mac or iPhone

How it differs between platforms: Mostly a Windows setting. Safari on Mac and iPhone does not report it.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported892021-03-02None
EdgeSupported792020-01-15None
FirefoxSupported892021-06-01None
SafariNot supportedNot availableNot listedNot supported
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported892021-03-02None
Samsung InternetSupported15.02021-08-13None

How a site asks for it

APImatchMedia('(forced-colors: active)')
Browser compat keyscss.at-rules.media.forced-colors
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsread fresh on every page load; nothing stored
How to take it backnone needed (no grant)
Inside an iframeReadable from cross-origin iframes too (same values)

Typical flow

  1. Page script reads the value
  2. No prompt is shown

Data you get

Shape: object
How often: static per session

FieldTypeUnitRangePrecision
forced-colorsenumNonenone, activeNot listed

Technical limits

  • Safari lacks it

The story

What it is

Tells a page that Windows High Contrast or a similar mode is forcing a color palette.

For you

You may not know it is read. If you use High Contrast, the site can show clear borders and plain colors so buttons stay visible.

For makers

Good makers use it to avoid unreadable pages for people with low vision or light sensitivity. It also reveals that a person may have a disability, which is private.

Where you see it

TypeExampleApps
accessibilityA web app adds strong outlines to buttons and icons when high contrast mode is on so none disappear.None named
gamesA browser word game swaps its color coded tiles for tiles with patterns or letters for high contrast users.None named
bankingA banking site keeps charts readable by changing line colors and adding labels.None named
productivityA document editor keeps selected text and comments visible when the palette is forced.None named
securityA fraud check treats forced colors as a normal real person signal and not as a bot.None named
analyticsA privacy minded team avoids logging the value because it can point to a disability.None named

Risks

  • May reveal a disability
  • Sensitive signal

What the platform says

Good uses and abuse

Legitimate uses

  • Respect OS theme and accessibility needs
  • Adapt layout

Known abuse

  • Infer disability or setting for fingerprinting

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits0.3Rough identifying entropy, when known

Sources

How well checked: Based on official documentation.

On this page