# color_depth

> The screen's colour depth in bits, usually 24 or 30.

Source: https://whiskerjs.com/signals/color-depth/ (last updated 2026-10-26)

**color_depth at a glance (from the library code, signalsVersion 9)**

| Field | Value |
| --- | --- |
| Component name | `color_depth` |
| In the visitorId | yes |
| structuredId group | [device (screen, memory, CPU)](https://whiskerjs.com/docs/identifiers/#structuredid) |
| Hashing | plain value; a digest only when longer than 128 characters or not printable ASCII |
| Excluded under | no browser class |
| Inner timeout | 1000 ms |
| Added in | [signalsVersion 1](https://whiskerjs.com/whats-new/) |

> **In plain words:**
>
> Colour depth is how many bits the screen uses to describe the colour of one pixel. Almost every screen says 24; some wide-colour and HDR setups say 30. It separates only a few groups of devices on its own, but it costs nothing to read and adds to the device picture.

## What it reads

`screen.colorDepth`, reported as a whole number in plain text.

## How the technique works

The value comes straight from the browser’s `screen` object, which reflects the display and the operating system’s colour settings. If it is not a finite number, the component is `unavailable` / `no_api`.

## Why it helps

Few distinct values exist, so the signal is weak alone. It helps in combination: a 30-bit screen narrows the device group, and it moves with display changes that other `device` components may not see. It is in the `device` group of the structuredId. On your server it is also a cheap consistency check: a phone user agent with a 30-bit colour depth, or a value that changes between two requests in the same session, is worth a look together with the other screen values.

## Stability

Very stable. It changes when the window moves to a display with a different colour depth, when HDR or the display’s colour mode is switched in the operating system, or on a different device.

## Browser support and what blocks it

`ok` in all browsers; not in the exclusion table. The container test runs used for these pages reported `24` in headless Chromium, Firefox and WebKit. The same value is compared with a clean iframe by [`iframe_mismatch`](https://whiskerjs.com/docs/integrity/#iframe_mismatch), and its getter is checked by [`native_tampering`](https://whiskerjs.com/docs/integrity/#native_tampering).

Because most displays report 24, expect the same value on most of your traffic; the component then adds little on its own, and its main use is the combination with the other `device` and `prefs` values.

## Privacy

A single coarse number, read without permission or prompt. WhiskerJS sends nothing itself.

## How WhiskerJS handles noise and failures

| Status | ruleId | When |
| --- | --- | --- |
| `ok` | none | for example `24` |
| `unavailable` | `no_api` | no `screen` or no numeric `colorDepth` |
| `blocked` | `security_error`, `threw` | reading threw |
| `excluded` | `caller_excluded` | your `exclude` list |
| `timed_out` | `timeout`, `aborted` | 1000 ms inner timeout, budget, abort |

## Example value

```json
"color_depth": { "status": "ok", "value": "24", "hashed": false }
```

## Questions and answers

### What values does color_depth usually have?

Most screens report 24. Some wide-colour or high dynamic range setups report 30. Other values are rare.

### Is color_depth the same as color_gamut?

No. color_depth is the number of bits per pixel the screen reports; color_gamut is the colour space the display covers (srgb, p3 or rec2020), read with a media query.

## Related pages

- [color_gamut](https://whiskerjs.com/signals/color-gamut/): The display's colour space.
- [dynamic_range](https://whiskerjs.com/signals/dynamic-range/): Whether the display is HDR.
- [screen_resolution](https://whiskerjs.com/signals/screen-resolution/): The screen size.
- [iframe_mismatch flag](https://whiskerjs.com/docs/integrity/#iframe_mismatch): Compares colorDepth with a clean frame.
