Skip to Content
Platform.Ontology

color-gamut

Widest color space the screen shows: sRGB, P3 or Rec2020.

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

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

BrowserStatusFirst versionReleasedNote
ChromeSupported582017-04-19None
EdgeSupported792020-01-15None
FirefoxSupported1102023-02-14None
SafariSupported102016-09-20None
Safari on iPhoneSupported102016-09-13None
Chrome on AndroidSupported582017-04-25None
Samsung InternetSupported7.02018-03-16None

How a site asks for it

APImatchMedia('(color-gamut: p3)')
Browser compat keyscss.at-rules.media.color-gamut
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
color-gamutenumNonesrgb, p3, rec2020Not 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

TypeExampleApps
shoppingA fashion or paint store shows richer swatches on a P3 screen so a red sofa looks closer to real life.None named
creativeA photo editor in the browser warns when your screen cannot show all the colors in an image.None named
gamesA WebGL game turns on a more vivid look for sunsets and neon on screens that can show it.None named
videoA streaming site offers wider color video only to screens that can really show it.Netflix
adsA brand ad uses the exact brand color in wide gamut on newer phones and laptops.None named
analyticsA 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

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 bits1.2Rough identifying entropy, when known

Sources

How well checked: Based on official documentation.

On this page