Skip to content

feat: add colorScheme option#411

Draft
AriPerkkio wants to merge 2 commits into
mainfrom
feat/color-scheme-option
Draft

feat: add colorScheme option#411
AriPerkkio wants to merge 2 commits into
mainfrom
feat/color-scheme-option

Conversation

@AriPerkkio

@AriPerkkio AriPerkkio commented Jun 25, 2026

Copy link
Copy Markdown
Member

Issue:

What Changed

Adds parameters.chromatic.colorScheme: 'light' | 'dark'. Value is resolved during runtime from window.matchMedia when takeSnapshot() is called - similarly as viewport is resolved during runtime. This allows a single test case to have multiple snapshot specific colorScheme values.

How to test

Added E2E tests that are all currently rendering with 'light', as Capture support for parameters.chromatic.colorScheme is required.

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 431882a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@chromatic-com/playwright Patch
@chromatic-com/cypress Patch
@chromatic-com/shared-e2e Patch
@chromatic-com/vitest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@chromatic-com/cypress@431882a -D
npm i https://pkg.pr.new/@chromatic-com/playwright@431882a -D
npm i https://pkg.pr.new/@chromatic-com/vitest@431882a -D

commit: 431882a

@AriPerkkio AriPerkkio force-pushed the feat/color-scheme-option branch from 6fad466 to 29e1f0a Compare June 25, 2026 11:42
@AriPerkkio AriPerkkio force-pushed the feat/color-scheme-option branch 2 times, most recently from 8d2a48f to 431882a Compare June 25, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for colorScheme option

1 participant