Color and pixel depth
Bits per pixel the screen reports; almost always 24.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 1 | 2004-11-09 | None |
| Safari | Supported | 1 | 2003-06-23 | None |
| Safari on iPhone | Supported | 1 | 2007-06-29 | None |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | screen.colorDepth, screen.pixelDepth |
| Browser compat keys | api.Screen.colorDepth |
| 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 |
|---|---|---|---|---|
colorDepth, pixelDepth | integer | bits | 16, 24, 30, 32; 24 on over 95% of browsers | Not 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
| Type | Example | Apps |
|---|---|---|
| games | A WebGL game picks the texture setup that fits the screen so colors in fog and fire do not band. | None named |
| analytics | A dashboard counts how many visitors have unusual displays so designers know what to test. | None named |
| security | A fraud service sees a browser that claims a depth no real screen reports and flags it as a possible bot. | None named |
| creative | A photo editor in the browser warns that the screen cannot show all the colors of a file. | None named |
| ads | An ad network adds the number to a device profile as one small clue among many. | None named |
| video | A 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
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 1 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 0.5 | Rough 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.