Skip to content

WCAG Contrast Pairs

acss-kit validates 10 contrast pairs against WCAG 2.2 AA requirements. All pairs must pass before theme files are written.

ForegroundBackgroundMinimumCategory
--color-text--color-background4.5:1Normal text
--color-primary--color-background4.5:1Interactive
--color-text-inverse--color-primary4.5:1Text on brand
--color-danger--color-background4.5:1Semantic text
--color-success--color-background4.5:1Semantic text
--color-warning--color-background3.0:1Non-text indicator
--color-info--color-background4.5:1Semantic text
--color-text-muted--color-background4.5:1Secondary text
--color-border--color-background3.0:1Non-text indicator
--color-text--color-surface4.5:1Text on card
  • 4.5:1 — normal text (< 18pt or < 14pt bold). Required for text, links, and UI labels.
  • 3.0:1 — large text (≥ 18pt or ≥ 14pt bold) or non-text UI components. Used for borders and warning indicators.

Use the browser DevTools color picker or a tool like WebAIM Contrast Checker to verify ratios. Paste the oklch() or hex values for both colors.