Repository navigation
Add a --mode option to the contrast checker - #371
Merged
Merged
Conversation
optics-check-contrast takes --mode=light or --mode=dark to check only one color mode. Apps that force one mode no longer need to filter --report output to ignore the other. Both modes are still checked by default, and an unknown mode exits with 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jeremy-Walton
force-pushed
the
add-contrast-mode-option
branch
from
October 22, 2026 20:21
f8d341e to
ab0876b
Compare
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 8.1.4 to 8.1.6. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v8.1.6/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v8.1.6/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 8.1.6 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jeremy-Walton
force-pushed
the
add-contrast-mode-option
branch
from
October 22, 2026 20:24
ab0876b to
42a11f5
Compare
gavinomelia
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
[OP-XXX](link to ticket)No ticket. Follow-up to #368.Why?
Apps that force one color mode get contrast failures for the mode their users never see, so they have to filter
--reportoutput to run the checker in CI. The new--modeoption checks only light or dark mode, so those apps can calloptics-check-contrastdirectly.This PR also carries the vite bump from #369, so it ships in 2.6.1.
What Changed
--mode=lightand--mode=darkto the contrast checker; both modes stay the default--modeand each option's default on the Contrast Checker pageQuality Assurance
[ ] Have you updated any usage of changed tokens?[ ] Did you add a component?[ ] Have you added it to the dependency graph?[ ] Have you added it to the docs?[ ] Did you update a component?[ ] Have you updated the dependency graph?[ ] Have you updated the docs?.storybook/assets?[ ] Were any changes made to the top level optics.css file?[ ] Were those changes reflected in the other top level files?Screenshots
None. No UI changes.