Palette contrast checker
Enter up to twelve colors, or paste your theme code, and see every pair's contrast at once: which combinations you can use for text, and the closest fix for the ones that fail.
How to use it
- Enter two to twelve colors as hex, rgb(), hsl() or color names, or open Paste a theme and paste your CSS variables or Tailwind config.
- Pick the target: AA for normal text, AAA, or AA for large text.
- Read the grid: each cell shows the row color as text on the column color, with its ratio and level.
- Under the grid, click a suggested fix to swap it into your palette. The page address updates, so you can share the check.
How it works
Every pair is measured with the WCAG 2 contrast ratio. AA needs 4.5:1 for normal text and 3:1 for large text (24px, or about 19px bold); AAA needs 7:1.
Fixes change only the darker color's OKLCH lightness, searching outward until the pair passes, so the hue stays recognizable. If no lightness works against that background, the tool says so.
Related tools
Questions
How is this different from the contrast checker?
The contrast checker tests one text and background pair in detail. This tool tests every pair in a whole palette at once, so you can see which combinations work before you design.
Which theme formats can I paste?
CSS custom properties, shadcn/ui globals.css (both the oklch and the older bare HSL style), Tailwind 3 configs, Tailwind 4 @theme blocks, SCSS variables and plain lists of colors. Each color keeps its variable name in the grid.
Why do so few pairs pass?
Colors close in lightness can't reach 4.5:1, even if their hues are very different. Most palettes need one very light and one very dark color to carry text.
Do the fixes change my brand colors a lot?
They change only lightness, by the smallest step that passes. If a fix moves too far, keep the original for decoration and use another pair for text.