Contrast audit
Drop in a preset code and see which text and button pairings clear 4.5:1, for both color schemes.
Aa
ContinueCancelNew
you@example.com
Aa
ContinueCancelNew
you@example.com
5/8
token pairs pass WCAG AA (4.5:1) in both light and dark mode.
| Pair | Tokens | Light | Dark |
|---|---|---|---|
| Body text | foreground / background | 19.59 | 18.93 |
| Muted text | muted-foreground / background | 4.26 | 8.43 |
| Card text | card-foreground / card | 19.59 | 16.38 |
| Primary button | primary-foreground / primary | 5.66 | 4.44 |
| Secondary button | secondary-foreground / secondary | 16.11 | 14.26 |
| Accent / hover | accent-foreground / accent | 15.37 | 13.79 |
| Muted surface | muted-foreground / muted | 3.86 | 6.14 |
| Destructive text | destructive / background | 4.91 | 6.82 |
What we check
We measure eight foreground/background pairs that cover most UI text, using the exact oklch tokens shadcn ships. Translucent tokens are blended over the background first. AA requires 4.5:1 for normal text.
Browse presets that pass every pair on the accessible presets page.