How it works
The contrast ratio compares the relative luminance of two colours: (L1 + 0.05) ÷ (L2 + 0.05), with L1 the lighter colour. Luminance is computed from the sRGB channels after removing the gamma curve, weighted by how sensitive the eye is to red, green and blue. Black on white gives 21:1; identical colours give 1:1.
The results table applies the WCAG 2.2 thresholds: 4.5:1 (AA) and 7:1 (AAA) for normal text, 3:1 (AA) and 4.5:1 (AAA) for large text, and 3:1 for user interface components and graphics. When a pair fails, the tool keeps the text colour’s hue and saturation and finds the closest lightness that passes.
Common uses
- Checking brand colour palettes and design tokens before they reach production.
- Finding an accessible variant of a colour that is slightly too light or too dark.
- Verifying button, link and form-field colours against their backgrounds.
- Preparing evidence for an accessibility audit or the European Accessibility Act.
