shadcnpreview

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.

PairTokensLightDark
Body textforeground / background19.5918.93
Muted textmuted-foreground / background4.268.43
Card textcard-foreground / card19.5916.38
Primary buttonprimary-foreground / primary5.664.44
Secondary buttonsecondary-foreground / secondary16.1114.26
Accent / hoveraccent-foreground / accent15.3713.79
Muted surfacemuted-foreground / muted3.866.14
Destructive textdestructive / background4.916.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.