color-gamut
Widest color space the screen shows: sRGB, P3 or Rec2020.
In one line
Can check whether your screen shows standard, wide P3 or very wide Rec2020 colors
Widest color space the screen shows: sRGB, P3 or Rec2020.
P3 separates Apple devices and OLED phones from budget screens. A few bits of hardware signal.
What it can and can't do
What the user does: Nothing. It happens when the page loads.
It can
- Ask whether your screen supports P3 or Rec2020
- Serve richer images and colors if it does
- Add the answer to a browser fingerprint
It cannot
- See your exact color profile or calibration
- Learn your monitor model
- Change anything on your screen
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 58 | 2017-04-19 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 110 | 2023-02-14 | None |
| Safari | Supported | 10 | 2016-09-20 | None |
| Safari on iPhone | Supported | 10 | 2016-09-13 | None |
| Chrome on Android | Supported | 58 | 2017-04-25 | None |
| Samsung Internet | Supported | 7.0 | 2018-03-16 | None |
How a site asks for it
| API | matchMedia('(color-gamut: p3)') |
| Browser compat keys | css.at-rules.media.color-gamut |
| 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 |
|---|---|---|---|---|
color-gamut | enum | None | srgb, p3, rec2020 | Not listed |
The story
What it is
Asks whether your screen can show a wide range of colors, such as the P3 range.
For you
You never get asked. If your screen is wide gamut, a site can show richer reds and greens. If not, it quietly uses safer colors.
For makers
Brands want their exact orange or green to look right. Developers use the check to switch to wide colors only where they will show. It also adds a small clue to device profiles.
Where you see it
| Type | Example | Apps |
|---|---|---|
| shopping | A fashion or paint store shows richer swatches on a P3 screen so a red sofa looks closer to real life. | None named |
| creative | A photo editor in the browser warns when your screen cannot show all the colors in an image. | None named |
| games | A WebGL game turns on a more vivid look for sunsets and neon on screens that can show it. | None named |
| video | A streaming site offers wider color video only to screens that can really show it. | Netflix |
| ads | A brand ad uses the exact brand color in wide gamut on newer phones and laptops. | None named |
| analytics | A fingerprint script notes the gamut as one more clue to group devices. | None named |
Risks
- Small fingerprint clue
- Reveals device class
What the platform says
- web.dev: High definition CSS color guide. Teaches developers how to use wide gamut color on newer screens and fall back safely on older ones.
- MDN: color-gamut media feature. Documents a media query that tells a page which range of colors the screen can show.
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.2 | 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.