v149 · CSS · Fingerprinting Context

Fingerprinting Context

The AccentColor CSS keyword exposes the user's OS accent color — a value that differs between users. Without restrictions, a script can read it via getComputedStyle() and use it as a fingerprinting bit. Chrome 149 removes this vector for normal web pages.

Fingerprinting is tracking users across sites without cookies by combining many small pieces of stable information about a device or user profile. Each additional bit of information halves the anonymous set a user hides in.

the fingerprinting attack

How AccentColor was used for fingerprinting (pre-Chrome 149)
  1. Page creates a hidden element with background: AccentColor
  2. Page calls getComputedStyle(el).backgroundColor
  3. Browser returns the actual OS accent color, e.g. rgb(0, 120, 215) (Windows blue) or rgb(255, 149, 0) (macOS orange)
  4. Script encodes this as a stable identifier — combined with screen resolution, installed fonts, and other signals, this contributes to a fingerprint that persists across sessions without cookies

before and after Chrome 149

Before Chrome 149

  • AccentColor returns real OS color everywhere
  • Any website can read user's system accent
  • Distinguishable fingerprinting bit available cross-origin
  • PWA-style theming works everywhere

Chrome 149+

  • Real OS color only in installed PWA context
  • Regular pages get a fixed neutral fallback
  • Fingerprinting bit removed from general web
  • Websites that used AccentColor for theming need to update

where AccentColor still works

Context Real OS accent? Notes
Regular browser tab No — fixed fallback Chrome 149+ returns neutral color
Installed PWA (standalone) Yes User chose to install — reduced risk
Installed PWA (minimal-ui) Yes Same — installed app context
Browser DevTools Yes Trusted environment
iframe in regular page No — fixed fallback Inherits parent page context

alternatives for web pages

/* If you need a consistent accent on web pages, use explicit CSS custom properties: */
:root {
  --accent: oklch(55% 0.2 250);  /* explicit brand blue */
}

/* Detect PWA context in CSS to use system accent only there: */
@media (display-mode: standalone), (display-mode: minimal-ui) {
  :root {
    --accent: AccentColor;  /* real OS color in installed app */
  }
}

button {
  background: var(--accent);
  color: var(--accent-text, white);
}

/* In JS: detect context before reading */
const isPWA = matchMedia('(display-mode: standalone)').matches;
if (isPWA) {
  // Safe to use AccentColor — real color available
}

see also

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗