Patch UI

Contrast Audit

Visual verification that every --patch-text-* token meets its declared WCAG contrast target against every surface token. The required thresholds are:

  • patch-text - AAA body text (≥ 7:1)
  • patch-text-secondary - AA body copy (≥ 4.5:1)
  • patch-text-tertiary - AA metadata/labels (≥ 4.5:1)
  • patch-text-quaternary - no guarantee; decorative use only

Ratios re-compute when you toggle light/dark mode. Green pills = passing, red = failing. The same verification runs in CI via npm run check:contrast -w packages/react.

patch-textAAA body, min 7:1
11px sample text
13px sample text
16px sample text
patch-bgn/a
11px sample text
13px sample text
16px sample text
patch-surfacen/a
11px sample text
13px sample text
16px sample text
patch-surface-hovern/a
patch-text-secondaryAA body, min 4.5:1
11px sample text
13px sample text
16px sample text
patch-bgn/a
11px sample text
13px sample text
16px sample text
patch-surfacen/a
11px sample text
13px sample text
16px sample text
patch-surface-hovern/a
patch-text-tertiaryAA meta, min 4.5:1
11px sample text
13px sample text
16px sample text
patch-bgn/a
11px sample text
13px sample text
16px sample text
patch-surfacen/a
11px sample text
13px sample text
16px sample text
patch-surface-hovern/a
patch-text-quaternarydecorative - no ratio guarantee
11px sample text
13px sample text
16px sample text
patch-bgn/a
11px sample text
13px sample text
16px sample text
patch-surfacen/a
11px sample text
13px sample text
16px sample text
patch-surface-hovern/a

When to use each tier

  • patch-text - primary body, headings, anything the user needs to read precisely.
  • patch-text-secondary - supporting body copy, descriptions, long-form prose.
  • patch-text-tertiary - labels, timestamps, metadata, section overlines. Not for body paragraphs.
  • patch-text-quaternary - decorative-only; placeholder hints, disabled states, accent detail.