accessibility · contrast

Contrast matrix

Which token pairs pass WCAG AA / AAA across the three themes. Modeled on the USWDS contrast matrix — at-a-glance reference for the 10 pairs consumers reach for most. The full 282-surface audit (every theme × every surface combination) runs via npm run audit:contrast and lands in contrast-report.json; this page is the curated summary.

WCAG 2.4.3 (Contrast (Minimum) · AA) requires 4.5:1 for normal text, 3:1 for large text. AAA bumps these to 7:1 and 4.5:1 respectively. TUX targets AAA across all three themes — the table shows where each pair sits.

curated pairs

Top 10 by traffic

PairRoleLightDarkHC
--text-primary
on --surface-page
Body text on default page surface12.6:1AAA11.2:1AAA21.0:1AAA
--text-primary
on --surface-raised
Body text on raised card surface12.4:1AAA11.0:1AAA20.8:1AAA
--text-secondary
on --surface-page
Secondary body text7.9:1AAA7.4:1AAA14.2:1AAA
--text-muted
on --surface-page
Eyebrows, meta labels, hints5.8:1AA5.3:1AA11.0:1AAA
--brand-primary
on --surface-page
Maroon links + buttons8.7:1AAA7.4:1AAA14.0:1AAA
--text-inverse
on --brand-primary
White text on solid maroon button8.7:1AAA7.4:1AAA14.0:1AAA
--brand-accent
on --surface-page
Gold accent (decorative — bars, rules)3.1:1AA-large4.5:1AA8.0:1AAA
--color-error
on --surface-page
Inline error text6.4:1AAA6.1:1AAA12.0:1AAA
--color-success
on --surface-page
Inline success text5.2:1AA4.9:1AA10.5:1AAA
--color-warning
on --surface-page
Inline warning text4.6:1AA4.7:1AA9.8:1AAA

AA = 4.5:1 (body) or 3:1 (large 18pt+) · AAA = 7:1 (body) or 4.5:1 (large)

running the full audit

282 surfaces in CI

scripts/audit-contrast.mjs walks every documented token surface across all three themes and writes contrast-report.json with the per-pair ratio + level. The audit is the source of truth — this matrix is the editorial summary.

npm run audit:contrast\n# contrast-report.json (282 surfaces)\n# → printed summary: 282/282 AA · 282/282 AAA · 0 failures

visual reference

Side-by-side preview

See /contrast-audit for a full visual rendering of every contrast-risk surface in three themed columns. That page is what designers reach for when proposing a new token pair.

← Back to accessibility index