October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Test a Website’s Dark Mode with Screenshot Comparisons

A repeatable dark-mode visual testing workflow: emulate the color scheme, capture named Playwright baselines, stabilize comparisons, and review diffs before updating references.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use browser color-scheme emulation to render your site in dark mode, save screenshots as named baselines, then compare later captures against them. Review every meaningful difference before updating a baseline, and keep the browser and operating environment consistent so unrelated rendering changes do not obscure real regressions.

What screenshot comparison catches in dark mode

A dark-mode screenshot test checks whether the page still looks and behaves as intended when the browser reports a dark color preference. It can reveal light surfaces that were not recolored, text that is hard to read, missing component boundaries, mismatched icons or images, and theme-specific layout changes.

As an Amazon Associate I earn from qualifying purchases.

Use matched states for a useful comparison: the same page, viewport, content, and interaction state in both schemes. Consider key templates and states such as a landing page, an article, open navigation, dialogs, forms, empty or error states, and any in-page theme toggle. This coverage is a practical test-design choice, not a prescribed inventory from Playwright.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set up Playwright to request dark mode

Playwright can emulate the browser’s prefers-color-scheme setting; you do not need to change the computer’s display setting. The documented values include light and dark. See Playwright’s emulation documentation.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

For a project using Playwright Test, configure the test’s browser context with colorScheme: 'dark'. This runnable example assumes the Playwright Test package is installed, the project’s base URL is configured if using /, and the test can reach the site:

import { test, expect } from '@playwright/test';

test.use({ colorScheme: 'dark' });

test('landing page dark appearance', async ({ page }) => {
  await page.goto('/');
  await expect(page).toHaveScreenshot('landing-dark.png');
});

Alternatively, set colorScheme: 'dark' when creating a browser context or call await page.emulateMedia({ colorScheme: 'dark' }) before navigating or capturing. For a corresponding light test, use colorScheme: 'light' and a separate baseline name.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Create and maintain screenshot baselines

  1. Choose repeatable coverage. Select the pages and interaction states that represent important user journeys. Keep their viewport dimensions and interactions consistent between runs.
  2. Make each page state stable. Load the target page, wait for necessary content, and establish the state you intend to test—for example, open a menu or show a form error—before capturing.
  3. Save the first reference. With Playwright Test, await expect(page).toHaveScreenshot('landing-dark.png') creates a reference on its first run. Later runs compare the new capture with that reference. See Playwright’s visual comparison documentation.
  4. Run comparisons in a consistent environment. Keep the operating system, browser version and settings, hardware conditions, and headless mode aligned with those used to create the baseline. Playwright warns that these factors can affect rendering; see its visual comparison guidance.
  5. Inspect differences before accepting them. Determine whether each changed area is an intended design update or a regression. Update a reference only after review; Playwright documents updating snapshots with --update-snapshots.

Control noisy captures without hiding defects

Dynamic data, animation, clocks, and other changing page content can create diffs unrelated to the dark theme. Make those inputs deterministic where practical. Playwright provides screenshot options and custom screenshot styles for managing volatile content; consult its screenshot controls documentation for the options available to your test.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use exclusions or comparison tolerance only for variation you have identified as acceptable. If tolerance is broad enough to conceal low-contrast text, missing borders, or an unexpected light surface, the comparison has stopped protecting the page. Keep useful evidence in the capture wherever possible, and review flagged areas in the context of the whole component.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Review a dark-mode diff systematically

  • Text: Check legibility and contrast across headings, body text, labels, placeholders, and disabled or error text.
  • Surfaces and boundaries: Look for unexpected light backgrounds, indistinguishable adjacent panels, and borders or dividers that disappear.
  • Icons and illustrations: Check that their colors remain visible and that theme-specific assets are the intended ones.
  • Images and embedded content: Look for images that clash with the dark palette or embedded areas that retain an unintended light surface.
  • Interactive states: Capture relevant focus, hover, disabled, and error states—not just the default page.
  • Layout: Check for shifts caused by theme-specific styles or assets, including changes in wrapping, spacing, or component size.

Run equivalent light- and dark-mode captures when both schemes are supported. A dark fix can accidentally damage the light presentation, so compare each scheme against its own named baseline.

Common problems and fixes

The page still looks light

Confirm that the page or browser context actually receives colorScheme: 'dark', or that page.emulateMedia({ colorScheme: 'dark' }) runs before capture. Also check whether the site uses a separate manual theme toggle; emulating the system preference does not guarantee that an application-level toggle is enabled.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

A baseline changes on a different machine

Rendering may vary with the host operating system, browser version, settings, hardware, power source, and headless mode, as Playwright cautions in its visual comparison guidance. Establish and compare references in a consistent environment before treating a changed image as an application regression.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Every run reports differences in dynamic areas

Stabilize the data, time, animation, or other changing state that causes the difference. If the content cannot be made deterministic, use Playwright’s screenshot controls to manage that specific region rather than loosening comparison settings across the whole page.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

A snapshot update makes the test pass but the page still looks wrong

Updating a reference accepts the new rendering; it does not establish that the rendering is correct. Inspect the diff first, fix unintended visual changes, and update only when the change is deliberate.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. Its API can request a dark-mode screenshot using the dark_mode parameter. For repeated regression checks, save the returned image as a named reference and compare it with later captures using your preferred image-diff workflow; the example below takes a screenshot, but does not itself create or compare baselines.

For example, request a dark capture of your deployed site with cURL:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -d dark_mode=true -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

Frequently Asked Questions

Does dark-mode screenshot testing change a user’s display setting?

No. Playwright emulates the browser’s color-scheme preference for the test; it does not change the computer’s physical display setting.

Should dark and light mode share one screenshot baseline?

No. Use distinct baseline names for each scheme so each appearance is compared with its matching reference.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.