Color Depth

Back to Main

Your Current Color Depth

Loading...

1. Technical Classification

Display Hardware JavaScript API Screen Object Bit Depth

Color depth is accessed through screen.colorDepth, which reports the number of bits used to represent the color of a single pixel:

2. Background & Purpose

Color depth has been part of JavaScript since the early days of the web. In the 1990s and early 2000s, displays varied widely in color capabilities, from 8-bit (256 colors) to 16-bit ("high color") to 24-bit ("true color"). Developers needed to know color depth to optimize graphics and images.

Historical Context

8-bit Color (256 colors)

Era: Late 1980s - mid 1990s

Details: Used a color palette (256 colors from a larger set). Common on early PCs and Macs.

Web Impact: Required careful color selection and dithering techniques

16-bit Color (65,536 colors)

Era: Mid-late 1990s

Details: 5 bits red, 6 bits green, 5 bits blue (RGB565)

Web Impact: Good enough for most content, but lacked true color accuracy

24-bit Color (16.7 million colors)

Era: Late 1990s - present

Details: 8 bits per channel (RGB888) - true color

Web Impact: Standard for modern displays; sufficient for most applications

32-bit Color (24-bit + alpha channel)

Era: 2000s - present

Details: 8 bits per RGB channel + 8 bits for transparency

Web Impact: Enables transparency effects; most common reported value today

Modern Reality

Today, virtually all displays support at least 24-bit color (true color), and most report 32-bit (which includes an alpha channel for transparency). Color depth is largely standardized, making it less useful for content optimization but still valuable for fingerprinting.

3. Common Color Depth Values

Bit Depth Total Colors Description Modern Usage
24 bits 16,777,216 True color (8 bits per RGB channel) Common on standard displays
32 bits 16,777,216 + alpha True color + transparency channel Most common value reported today
30 bits 1,073,741,824 Deep color (10 bits per RGB channel) Professional displays, rare in browsers
16 bits 65,536 High color (RGB565) Very rare; legacy systems only
8 bits 256 Indexed color palette Obsolete; not seen on modern web

Platform-Specific Behavior

Technical Note

The difference between 24-bit and 32-bit is mostly semantic in modern systems. Both provide the same 16.7 million colors; 32-bit just explicitly includes the alpha (transparency) channel, which is used for compositing windows and UI elements.

4. Legitimate Uses (Historical & Modern)

Historical Uses (1990s-2000s)

Modern Uses (Limited)

In practice, color depth is rarely used for legitimate purposes today because:

The few remaining uses include:

10-bit Color & HDR

Modern high-end displays support 10-bit color per channel (30-bit total), enabling HDR (High Dynamic Range) content. However:

5. Browser & Platform Differences

Cross-Browser Consistency

All modern browsers report screen.colorDepth consistently on the same hardware. The value depends on the operating system and display configuration, not the browser.

Operating System Differences

Platform Typical Value Notes
Windows 10/11 32 bits Almost universal on modern Windows
macOS 24 bits Even on Retina displays with higher capabilities
Linux 24 or 32 bits Depends on X11/Wayland configuration
iOS 32 bits Consistent across all modern iOS devices
Android 24 or 32 bits Varies by device and Android version

Edge Cases

Related Property: screen.pixelDepth

screen.pixelDepth is essentially identical to colorDepth on modern systems. It was intended to represent bits per pixel for the frame buffer, but in practice, both properties return the same value.

6. Privacy Implications & Tracking Risks

Privacy Risk: LOW-MEDIUM

Color depth provides minimal fingerprinting value on its own due to standardization (most users report 24 or 32 bits), but it contributes to overall device fingerprinting when combined with other attributes.

Limited Uniqueness

Because nearly all modern devices report either 24-bit or 32-bit color depth, this attribute alone provides very little identifying information—approximately 1 bit of entropy (dividing users into two roughly equal groups).

Operating System Inference

Weak OS Fingerprinting

The color depth value can weakly suggest operating system:

  • 32 bits + Windows User Agent: Likely Windows (consistent)
  • 24 bits + macOS User Agent: Likely macOS (consistent)
  • 24 bits + Windows User Agent: Potential user agent spoof or unusual config

This can help trackers detect browser fingerprint spoofing attempts.

Combined Fingerprinting

While weak alone, color depth adds to fingerprinting when combined with:

Example Fingerprint Combination

User Profile A:

  • Resolution: 2560×1440
  • Color Depth: 32 bits
  • User Agent: Windows 11
  • DPR: 1.0

Inference: High-end Windows desktop with standard DPI scaling

User Profile B:

  • Resolution: 1920×1080
  • Color Depth: 24 bits
  • User Agent: macOS
  • DPR: 2.0

Inference: Older MacBook with Retina display

Why Color Depth Matters Less Than Other Attributes

7. Protection & Mitigation

1. Privacy Browsers

Tor Browser

Reports standardized fake values for all screen properties, including color depth. All Tor users appear identical.

Effectiveness: Complete protection

Brave Browser

With fingerprinting protection enabled, may standardize or randomize color depth values.

Effectiveness: Partial protection

2. Changing Display Settings (Not Recommended)

You can technically change your display's color depth in operating system settings, but:

3. Browser Extensions

Some anti-fingerprinting extensions spoof screen.colorDepth, but:

Practical Recommendations

  1. Don't worry about color depth specifically – it's one of the weakest fingerprinting attributes
  2. Focus on high-impact protections:
    • Block third-party cookies
    • Use tracker blockers (uBlock Origin)
    • Use Firefox or Brave with enhanced privacy settings
  3. For maximum anonymity: Use Tor Browser, which protects against all screen-based fingerprinting
Bottom Line

Color depth is a minor fingerprinting concern. Don't sacrifice usability to protect against it. Instead, use comprehensive privacy tools that address all fingerprinting vectors simultaneously.

8. Learn More