prefers-contrast
OS setting for higher or lower color contrast.
Gets silentlyWhen the page loads
Signals low vision or light sensitivity. Values no-preference, more, less, custom. Rare, so each non-default value is highly distinguishing.
What it can and can't do
Reach 1 of 4One answer, no prompt
What the user does: Nothing. It happens when the page loads.
It can
- Check whether you chose more, less or normal contrast
- Change its colors to match
- Add the answer to a browser fingerprint
It cannot
- Tell why you chose it, though it can hint at a vision need
- See your other accessibility settings
- Change the setting
Browser support
How a site asks for it
| API | matchMedia('(prefers-contrast: more)') |
| Browser compat keys | css.at-rules.media.prefers-contrast |
| 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 |
|---|---|---|---|---|
prefers-contrast | enum | None | no-preference, more, less, custom | Not listed |
The story
What it is
Tells a page whether you asked your device for more or less color contrast.
For you
You never see the check. If you turned on higher contrast, a good site gives you stronger borders and darker text without a menu.
For makers
Makers use it to make pages readable for low vision and bright sunlight. It is also a private fact. The setting may point to a disability, so careful teams do not log it.
Where you see it
| Type | Example | Apps |
|---|---|---|
| accessibility | A web app darkens gray text and thickens borders when you ask for more contrast. | None named |
| banking | A bank dashboard uses stronger chart lines and labels for people who need higher contrast. | None named |
| games | A browser puzzle game boosts tile outlines so shapes are clear on a small screen. | None named |
| media | A reading app shows pure black on white text and removes pale gray hints. | None named |
| education | A learning platform adapts lesson slides for students with low vision. | None named |
| analytics | A team chooses not to record the value because it may reveal a health need. | None named |
Risks
- May reveal a disability
- Sensitive signal
What the platform says
- MDN: prefers-contrast. Documents how a page can notice the person wants higher or lower contrast and adapt its colors.
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 | 1 | 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.