New card theme: high-contrast (accessibility) - #39
Open
dchaudhari7177 wants to merge 1 commit into
Open
Conversation
Owner
|
Conflict against main now — a few other PRs touching |
Every existing theme is an aesthetic palette; none targets accessibility. Add high-contrast, where each text token clears WCAG AAA (7:1) against both the page background and the stat panel: fg #ffffff 21.00 : 1 vs bg, 17.04 : 1 vs panel muted #d0d0d0 13.62 : 1 vs bg, 11.05 : 1 vs panel accent #ffd60a 14.88 : 1 vs bg, 12.07 : 1 vs panel The amber accent stays distinguishable under red-green colour-vision deficiencies, which a green or red accent would not. The test asserts the computed contrast ratios rather than hex format alone, via a small dependency-free WCAG luminance/ratio helper that is itself checked against the reference 21:1 and 1:1 values. Closes notsointresting#35
dchaudhari7177
force-pushed
the
feat/theme-high-contrast
branch
from
July 23, 2026 15:31
90baf21 to
068431a
Compare
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.
Every current theme is an aesthetic palette; none targets accessibility. This adds
high-contrast, built to a contrast budget rather than a mood.Measured ratios
Every text token clears WCAG AAA (7:1) against both the page background and the stat panel — not just against
bg, since the big numbers sit onpanel:bg#000000panel#1c1c1cfg#ffffffmuted#d0d0d0accent#ffd60aThe amber accent is deliberate: it stays distinguishable under the common red-green colour-vision deficiencies, which a green or red accent would not.
Test
Per the issue, the test asserts the computed contrast ratio, not just hex format. It adds a small dependency-free WCAG 2.1 luminance/ratio helper (matching the project's zero-dep stance), and:
bgandpanel;high-contrastis verifiably the highest-contrast theme registered — a regression guard if someone later tweaks it;Typecheck and the full suite are green.
Closes #35