forced-colors
True when Windows High Contrast or similar forces a palette.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 89 | 2021-03-02 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 89 | 2021-06-01 | None |
| Safari | Not supported | Not available | Not listed | Not supported |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Supported | 89 | 2021-03-02 | None |
| Samsung Internet | Supported | 15.0 | 2021-08-13 | None |
How a site asks for it
| API | matchMedia('(forced-colors: active)') |
| Browser compat keys | css.at-rules.media.forced-colors |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | read fresh on every page load; nothing stored |
| How to take it back | none needed (no grant) |
| Inside an iframe | Readable from cross-origin iframes too (same values) |
Typical flow
- Page script reads the value
- No prompt is shown
Data you get
Shape: object
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
forced-colors | enum | None | none, active | Not 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
| Type | Example | Apps |
|---|---|---|
| accessibility | A web app adds strong outlines to buttons and icons when high contrast mode is on so none disappear. | None named |
| games | A browser word game swaps its color coded tiles for tiles with patterns or letters for high contrast users. | None named |
| banking | A banking site keeps charts readable by changing line colors and adding labels. | None named |
| productivity | A document editor keeps selected text and comments visible when the palette is forced. | None named |
| security | A fraud check treats forced colors as a normal real person signal and not as a bot. | None named |
| analytics | A 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
- MDN: forced-colors media feature. Documents how a page can detect forced colors modes and keep its content readable.
Good uses and abuse
Legitimate uses
- Respect OS theme and accessibility needs
- Adapt layout
Known abuse
- Infer disability or setting for fingerprinting
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 0.3 | Rough identifying entropy, when known |
Related capabilities
Related
- Accessibility settings inferred. Can guess you may use accessibility settings by combining several browser signals
Sources
How well checked: Based on official documentation.