Palette: add per-color foregrounds with a WCAG AA contrast guard #5
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
project-halkyon/halkyon-shared!5
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/5/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Each picker color now ships a (background, foreground, outline) triple.
The foreground is the text/icon color to use on the background fill:
pure white or pure black per color, whichever contrasts more. No single
theme-wide text color is readable across all 20 fills (in light mode
every fill fails 4.5:1 against Material's default label colors; in dark
mode 8 do in the other direction) — a per-color pick passes AA on all
20, worst case sahara at 4.59:1.
Guarded by tests: every pair must meet 4.5:1, and foregrounds must stay
pure white/black unless deliberately hand-tuned. The enum-sync test's
exhaustive switch is hoisted into a shared helper covering the triple.