CSS system colors and system fonts
Computed values of system color keywords and font names reveal OS and theme.
In one line
Can guess your OS and theme from how system colors and fonts look
Computed values of system color keywords and font names reveal OS and theme.
getComputedStyle on keywords like ActiveText, Canvas, ButtonFace, and system-ui fonts returns OS-specific RGB values and font names. CreepJS uses them to detect OS, theme and spoofing.
What it can and can't do
What the user does: Nothing. It happens when the page loads
It can
- Check the colors of built in items like buttons and links
- Check the system font names and sizes
- Tell Windows, macOS, and Android apart
- Spot a browser that is faking its identity
It cannot
- See your wallpaper or personal files
- See a list of every font you installed
- Learn your name from the colors
- Tell your exact OS version
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 | getComputedStyle(el).color for system keywords; font: caption, menu, status-bar |
| 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 |
|---|---|---|---|---|
system color RGB | string | rgb() | about 30 keywords | exact |
system font family and size | string | None | per OS | Not listed |
Technical limits
- Tor Browser and RFP normalize them
The story
What it is
Reads how your system draws buttons, links and fonts, which varies by operating system and theme.
For you
You never see it. It runs in the background by asking the browser what color your system uses for plain buttons and which font it uses for menus. Different systems give different answers.
For makers
Some sites use it to match your system theme. Tracking and anti-fraud tools use the same answers to guess the operating system and spot tools that hide it. CreepJS style tests use it to see whether privacy tools are lying.
Where you see it
| Type | Example | Apps |
|---|---|---|
| security | A fingerprinting library reads system colors to notice that a browser claiming to be Windows draws buttons like macOS. | FingerprintJS, CreepJS |
| productivity | A web app matches buttons and menus to your system theme, so it looks native in dark or light mode. | None named |
| accessibility | A page reads forced-colors system keywords to respect a person using high contrast mode. | None named |
| creative | A browser design tool checks system fonts to show previews that match your computer. | Figma |
| ads | An ad network adds the theme and font answers to its device ID to tell visitors apart. | None named |
| games | A browser game uses the system color scheme to choose a dark or light menu automatically. | None named |
Risks
- Reveals OS and settings
- Helps tracking without cookies
Good uses and abuse
Legitimate uses
- Match native UI
Known abuse
- OS and theme fingerprint
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 2 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 3 | Rough identifying entropy, when known |
Related capabilities
Related
- prefers-color-scheme. Can tell whether your device theme is light or dark
Sources
How well checked: Inferred from related behavior.