---
title: "Dark mode, reduced motion and forced colors are part of the reproduction | Proofline"
description: "A user's operating system settings reach the page as CSS media features: a dark color scheme, reduced motion, higher contrast, forced colors."
url: https://proofline.sh/learn/user-preference-media-features/
---

[Learning center](/learn/)

# Dark mode, reduced motion and forced colors are part of the reproduction

A user's operating system settings reach the page as CSS media features: a dark color scheme, reduced motion, higher contrast, forced colors. They change which styles and scripts run, and the reporter rarely thinks to mention them. Read them from the reporter's browser and emulate them in the replay.

Broken dependencies The Proofline team November 22, 2026 2 min read

## Read them from the browser

Ask the reporter to run this on the page:

```
Object.fromEntries([
  '(prefers-color-scheme: dark)', '(prefers-reduced-motion: reduce)', '(prefers-contrast: more)',
  '(forced-colors: active)', '(prefers-reduced-transparency: reduce)', '(inverted-colors: inverted)',
].map(q => [q, matchMedia(q).matches]))
```

A browser that does not support a feature reports `false`. Note the browser with the result. [MDN: Using media queries for accessibility](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries_for_accessibility)

Also ask whether the site has its own theme setting, since an app setting can override, or fight with, the system preference.

## Emulate them

Playwright sets them per context or per page:

```
await page.emulateMedia({ colorScheme: 'dark', reducedMotion: 'reduce', forcedColors: 'active', contrast: 'more' });
```

We ran that in Chromium and the page's `matchMedia` returned `true` for all four queries. [Playwright: `page.emulateMedia()`](https://playwright.dev/docs/api/class-page#page-emulate-media)

In Chrome DevTools, the **Rendering** panel emulates `prefers-color-scheme`, `prefers-reduced-motion`, `prefers-contrast`, `forced-colors` and others for the open tab. [Chrome DevTools: Rendering features](https://developer.chrome.com/docs/devtools/rendering/emulate-css)

## Bugs that hide behind each preference

| Preference | Typical bug |
| --- | --- |
| Dark color scheme | Text in a color the theme did not override, an icon with a hard-coded fill, an image with a transparent background that disappears |
| Reduced motion | A script waits for `transitionend` or `animationend`, which never fires when the stylesheet removes the animation |
| Forced colors (Windows high contrast) | Backgrounds and box shadows removed, so a focus ring or a selected state made with them disappears; custom checkboxes vanish |
| More contrast | Styles that only exist for the default contrast, such as borders drawn with a near-background color |

The reduced motion row deserves attention because it breaks function, not only looks. A modal that removes itself on `transitionend` stays on screen forever when the transition is set to `none`.

## Worked example: a toast that never closed

This example is fictional. A user reports that the "Saved" toast never goes away and covers the page's **Next** button. Developers cannot reproduce it.

The user's media query check shows `(prefers-reduced-motion: reduce): true`. The site's stylesheet set `transition: none` for reduced motion, and the toast component removed itself in a `transitionend` handler after fading out. With no transition, no event fired. Emulating `reducedMotion: 'reduce'` in Playwright reproduced it on every run. The fix removed the toast after its timer whether or not a transition ran.

## Questions

### Are these preferences sensitive?

They can reveal accessibility needs. Collect them for the reproduction, keep them with the bug, and do not log them as user attributes elsewhere.

### Does forced colors emulation match Windows exactly?

It applies the forced colors behavior in Chromium. The actual palette comes from the user's Windows theme. If the bug depends on particular colors, ask for a screenshot as well.

### Do these apply to emails and PDFs generated by the app?

Not through the browser. They are rendered elsewhere, with that client's own settings.

Return to [reproducing what someone else saw](/learn/replay-browser-bug-report/) for the other layers a replay needs.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Report the viewport and zoom, not the screen resolution](/learn/replay-viewport-zoom/)
    
    Broken dependencies The Proofline team November 22, 2026 3 min read
    
-   ### [Reproduce the browser behavior someone else saw](/learn/replay-browser-bug-report/)
    
    Network outages The Proofline team November 22, 2026 7 min read
