October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan 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 desk4 min

How Chromatic Detects Visual Changes in Storybook

Chromatic renders Storybook tests in cloud browsers and compares each capture with the accepted baseline for the matching test and browser context.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Chromatic detects visual changes by rendering Storybook stories in cloud browsers, capturing screenshots, and comparing each capture with the accepted baseline for that test. It highlights differences for a person to review; the diff signals that pixels changed, not that a bug necessarily occurred.

What Chromatic treats as a visual test

A Storybook story defines a repeatable component state, so Chromatic can use each story as a test case. A test might represent a particular component variant, data state, or interaction result. Chromatic’s Visual tests documentation describes the process as capturing snapshots of tests in a cloud browser environment.

As an Amazon Associate I earn from qualifying purchases.

When a Storybook build is uploaded, Chromatic loads the stories selected for testing in its browser environment. Each capture is associated with its test and build context, including configured browser and viewport information.

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

How capture and comparison work

  1. Load the story. Chromatic opens the test in a cloud browser at its configured device and viewport.
  2. Wait for the UI. It uses readiness heuristics, including network inactivity, and allows Storybook interaction tests’ play functions to complete before capture.
  3. Capture a snapshot. Chromatic takes an image of the rendered UI state.
  4. Compare with the relevant baseline. The new image is compared with the prior accepted snapshot for that test and context.
  5. Review the result. Differences are highlighted so a developer can decide whether to accept an intentional change or fix an unintended one.

The baseline is the accepted known-good state for that test. Accepting an intentional visual change advances the baseline for later comparisons; it does not make the visual difference disappear from the review that prompted the decision. See Chromatic’s Quickstart for the initial-baseline and subsequent-build workflow.

What a visual diff means

A diff means Chromatic found image differences under its comparison settings. It does not decide whether those changes are correct. A changed button color may be intended after a redesign; a shifted layout caused by a regression may need a fix. Review the highlighted area against the product requirement and the change being made before accepting it.

How the diff threshold affects sensitivity

Chromatic’s documented diffThreshold default is .063. This is a tolerance for color difference at corresponding image coordinates, described using YIQ color space; it is not a percentage of the page or of pixels that may change. The exact setting and its interpretation are documented in Chromatic’s threshold guide.

  • A lower threshold makes comparison more sensitive and can flag smaller color differences, but may increase noise from rendering variation.
  • A higher threshold can reduce noisy diffs, but may stop subtle visual changes from being flagged.
  • Anti-aliased pixels are ignored by default; Chromatic provides a configuration option to include them.

Choose sensitivity in light of the kinds of changes that matter in your UI. Do not treat the default as a universal guarantee that every meaningful change will be caught or every harmless difference suppressed.

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.

Why browser and viewport context matters

Chromatic compares a browser’s capture with a baseline for that same browser rather than comparing, for example, a Chrome capture directly with a Firefox capture. Browser, device, and operating-system rendering can differ, so each configured browser or viewport context can have its own baseline. This makes a diff answer the practical question “Did this test change in this context?” rather than “Are these two browsers pixel-identical?” Details are in Chromatic’s browser documentation.

Adding browser or viewport coverage can reveal issues specific to those contexts, but it also creates more context-specific snapshots to review and maintain.

How branches and accepted changes affect baselines

Chromatic’s UI Tests compare a branch build against a baseline in that branch’s ancestry. Once a change is accepted, the updated baseline can inform subsequent checks. The Storybook Visual Tests addon supports reviewing tests from Storybook and synchronizing accepted local baselines to the cloud. See the Visual Tests addon documentation for that workflow.

Rank #4
The Web Testing Handbook
  • Used Book in Good Condition

Keeping captures stable

Chromatic attempts to capture a settled interface, but capture readiness is not the same as deterministic rendering. Its snapshot process pauses CSS animations, transitions, videos, and GIFs to reduce variation. JavaScript-driven animation may continue unless the test controls it; asynchronous data, timestamps, random values, and other changing state can also make otherwise identical runs look different. The capture behavior and caveats are covered in Chromatic’s snapshots documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Give stories stable data and explicit states rather than relying on live or changing content.
  • For animated interfaces, make the tested state deterministic—for example, control the animation or render a stable frame in the test.
  • Use interaction tests to reach the intended state, and ensure the story’s play function finishes the relevant interactions before capture.
  • If a capture differs from Storybook’s Canvas view, inspect the configured viewport, browser, readiness conditions, and runtime state; the capture environment may not reproduce the local view exactly.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

Chromatic is designed to compare Storybook tests against managed baselines. If you need a standalone screenshot of a page instead, ScreenshotNeo is a website screenshot API and MCP server. A single request can return an image or PDF; see the API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie or consent banners, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status. Its MCP server provides screenshot and page-information tools for AI agents. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan.

Frequently Asked Questions

Does Chromatic compare a screenshot with the live website?

No. It compares a Storybook test capture with the relevant accepted baseline for that test and context.

Is Chromatic’s default diffThreshold .063 a 6.3% pixel-change allowance?

No. It is a color-difference tolerance, not a proportion of the image.

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

Will accepting a change fix the code?

No. Acceptance updates the baseline; code changes are needed to correct an unintended regression.

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.

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
Crashes, No Sound, or Screen Glitches?Free driver scan

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.