Signal · signalsVersion 5

forced_colors

Whether a forced colour mode is on, such as a Windows contrast theme, from the forced-colors media query: active or none.

forced_colors at a glance (from the library code, signalsVersion 5)
Component nameforced_colors
In the visitorIdyes
structuredId groupprefs (display and accessibility preferences)
Hashingplain value; a digest only when longer than 128 characters or not printable ASCII
Excluded underno browser class
Inner timeout1000 ms
Added insignalsVersion 1
In plain words

Some people use a mode where the system replaces every website’s colours with a small set of their own, usually with strong contrast. Windows calls these contrast themes. Browsers tell pages whether such a mode is active. WhiskerJS records active or none.

What it reads

The CSS forced-colors media feature through window.matchMedia().

How the technique works

Order Query Value reported
1 (forced-colors: active) active
2 (forced-colors: none) none

The first match is reported; neither matching gives unavailable with no_match.

Why it helps

Almost everyone reports none, so the value tells most devices nothing. For the users who rely on forced colours it is a long-lasting setting, which makes it stable and distinctive for them.

On your server, read it together with the other four preference components. They share the prefs part of the structuredId, so a result where only that part moved usually means a display or accessibility setting changed, not a different device. See Comparing two results.

Stability

Very stable: people who need forced colours keep them on, and people who do not never switch them on. It changes only when the setting changes.

Browser support and what blocks it

Current Chromium browsers (Chrome, Edge) and Firefox understand forced-colors; Safari versions that know the feature answer it too, otherwise the result is no_match. Forced colour modes are mostly a desktop Windows feature. No browser class excludes it.

Privacy

This is an accessibility setting. active can hint that a user has visual needs, which in some laws can come close to sensitive information. WhiskerJS reads it only to tell devices apart, never shows it anywhere and never decides anything. If you do not need it, leave it out with collect({ exclude: ['forced_colors'] }) (that changes ids, since it is in the visitorId). See Privacy.

How WhiskerJS handles noise and failures

Status ruleId When
ok active or none
unavailable no_api no matchMedia
unavailable no_match neither query matched
blocked threw, security_error matchMedia throws
excluded caller_excluded you excluded it
timed_out timeout, aborted budget or abort

Example value

All three headless test browsers in the container reported none.

Questions and answers

What turns forced_colors to active?

An operating system or browser mode that replaces page colours with a limited palette chosen by the user, best known as the contrast themes on Windows.

Is this an accessibility setting?

Yes. Users who need high contrast turn it on, so active can say something about a user's needs. Mention it in your privacy notice and use it only for its purpose.