Skip to Content
Platform.Ontology

Color and pixel depth

Bits per pixel the screen reports; almost always 24.

Gets silentlyScreen and windowsScreenWeb browsersWhen the page loadsWhile you use it

In one line

Can see how many colors your screen reports, almost always 24 bit

Bits per pixel the screen reports; almost always 24.

Reported colorDepth is 24 on nearly everything (30 on some wide-gamut Safari setups, 16 or 32 rarely). Low entropy but included in every library.

What it can and can't do

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

It can

  • Check the color depth number your screen reports
  • Pick image or video quality to match
  • Add the number to a browser fingerprint

It cannot

  • Tell which monitor model you have
  • See your color profile or calibration
  • Learn much that is unique, since nearly every screen says 24

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11None
EdgeSupported122015-07-29None
FirefoxSupported12004-11-09None
SafariSupported12003-06-23None
Safari on iPhoneSupported12007-06-29None
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIscreen.colorDepth, screen.pixelDepth
Browser compat keysapi.Screen.colorDepth
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
colorDepth, pixelDepthintegerbits16, 24, 30, 32; 24 on over 95% of browsersNot listed

Technical limits

  • Spec says return 24

The story

What it is

How many bits of color each screen pixel uses. It is almost always 24.

For you

You never see this. The page just reads a number from your screen. On almost every device it says 24, so it changes nothing for you.

For makers

Because nearly everyone reports 24, the value tells a site very little. Makers still read it to pick image formats. Fraud teams use odd values to spot fake browsers.

Where you see it

TypeExampleApps
gamesA WebGL game picks the texture setup that fits the screen so colors in fog and fire do not band.None named
analyticsA dashboard counts how many visitors have unusual displays so designers know what to test.None named
securityA fraud service sees a browser that claims a depth no real screen reports and flags it as a possible bot.None named
creativeA photo editor in the browser warns that the screen cannot show all the colors of a file.None named
adsAn ad network adds the number to a device profile as one small clue among many.None named
videoA video player decides whether to offer richer color streams.None named

Risks

  • Tiny fingerprint clue
  • Rarely useful

What the platform says

  • MDN: Screen.colorDepth. Documents a read only value that reports the number of bits used to show one color on the screen.

Good uses and abuse

Legitimate uses

  • Legacy

Known abuse

  • Fingerprint bits

Scores

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

A real example: LinkedIn

Collected as color depth and pixel depth. Read by the LinkedIn APFC fingerprint script (alleged by BrowserGate, partly confirmed by BleepingComputer).

Sources

How well checked: Based on official documentation.

On this page