Real WCAG 2.2 luminance maths. Instant AA and AAA pass-fail for normal and large text. The same engine that powers the full audit inside UX Companion.
Paste two colours, get an instant ratio. Computes the WCAG relative luminance ratio between text and background, grading for AA and AAA on normal (≥14px) and large (≥18px or 14px bold) text.
WCAG defines contrast as a ratio between the relative luminance of two colours, on a scale from 1:1 (no contrast) to 21:1 (white on black). The minimum required ratio depends on the text size and the conformance level you're targeting:
Three patterns we see again and again across the audits run inside UX Companion:
The default state passes; the hover state fails. Buttons that lighten on hover are particularly susceptible — designers often use a +10% lightness token, which can drop a 4.6:1 button to 3.2:1.
Placeholders are usually styled as low-contrast grey on white. WCAG only requires 4.5:1 for the placeholder if it's conveying information not available elsewhere — but a lot of forms do convey field meaning through placeholder alone, which fails on a separate count (Labels or Instructions).
Hero text on photographs. The contrast ratio against the dominant pixel may pass, but the text overlaps darker and lighter regions. Either add a scrim, restrict text to a single-tone area, or use a solid background.
Contrast is one of around 50 WCAG 2.2 success criteria. The full UX Companion accessibility audit also checks tap-target sizing (2.5.8), focus visibility (2.4.7), labelling (3.3.2), heading hierarchy (1.3.1), and reading age — paired with AI-written rationale and suggested fixes for each finding.
See how the full UX Companion accessibility audit pairs eleven WCAG checks with AI-written rationale per finding.