Check a colour palette for contrast
Find the colour pairs that fail and fix them before they ship.
A design looks fine on the designer's large monitor. On a phone in sunlight, the grey caption under the photo has vanished, the light-green button label cannot be read and the placeholder text in the form looks like it is not there. Low contrast is rarely one dramatic mistake. It is a dozen pairs that each look acceptable in isolation.
This template makes the check systematic. You list every pair of colours where text sits on a background. You pick the real colour values, because eyeballing a screenshot gives an approximation. You test each pair against the contrast rules, fix those that fail and write down the pairs you approved. It takes about as long as a coffee, and it is the check that an accessibility review will do anyway.
It is for designers and developers who have a palette and need to know which combinations are safe to use.
Use it now
5 tasks, in the order you do them. Tasks with a tool open it with the job's files and tick themselves when you save the result.
- 1Collect the colour pairs you use for text
- 2Pick the exact colours from the designColor Picker
- 3Test every pairContrast Checker
- 4Adjust the pairs that fail
- 5Write the approved pairs in the note
Step by step, and why the defaults are what they are
1. Collect the colour pairs you use for text
List each text role and the background it sits on: body text on the page, captions, links, button labels, placeholders, text over images. Ignore pure decoration.
Why this default. Contrast is a property of a pair, not of a colour. Starting with the pairs actually used keeps the check small and relevant, and catches the awkward ones like placeholders and disabled states.
2. Pick the exact colours from the design
Open Color Picker, load a screenshot or export of the design and click the text and the background of each pair. Copy the HEX codes into the note.
Why this default. Colours from a screenshot can shift with the screen's colour profile. If you have the design file's own values, use those; the picker is for when all you have is an image. Open Color Picker.
3. Test every pair
Enter each pair in Contrast Checker. For text at normal size, the guideline asks for at least 4.5 to 1. For large text, which is about 18 points or 14 points bold, 3 to 1 is enough. Interface parts such as input borders and icons need 3 to 1 as well.
Why this default. These are the thresholds of WCAG level AA, the standard most laws and accessibility audits refer to. The higher AAA level of 7 to 1 is a good target for long reading text but is not always practical for a brand colour. Open Contrast Checker.
4. Adjust the pairs that fail
For each failing pair, darken the text or lighten the background in small steps until it passes, and keep the hue. Change one side only; if both move, the design drifts.
Why this default. A small change in lightness is usually enough and keeps the colour recognisable. Changing the hue turns the fix into a redesign.
5. Write the approved pairs in the note
List each pair that passes, with its codes and the smallest text size it is approved for. Keep the failing ones too, marked as not for text.
Why this default. The list is what a developer uses when they build the page and what a reviewer asks for. Writing down the "not for text" colours stops them from reappearing in the next design.
Variants
Dark mode
Test the dark theme as its own set of pairs. A colour that passes on white may fail on dark grey.
Colour blindness
Contrast ratio does not tell you whether two colours can be told apart by someone with a colour vision difference. Do not use colour alone to carry meaning, and add a label or an icon.
Text over a photo
Test against the lightest and darkest area under the text, or put a solid or semi-transparent layer behind it.
Common problems
The pair fails by a little.
A near miss is a fail. Nudge one colour until it passes; the change is usually too small to see.
The brand colour does not pass on white.
Use it for large shapes and a darker shade of it for text.
My numbers differ from another checker.
Check that both use the same formula and the same codes. A slightly different colour, or a transparency, changes the result.
Questions
Is my design uploaded?
No. The picker reads the image in your browser, and contrast is calculated locally.
Does passing mean the design is accessible?
No. Contrast is one part of accessibility, and size, spacing, labels and keyboard use matter as well.
Is contrast required by law?
Many accessibility rules point to WCAG AA. Check the rules for your country and your client rather than relying on this page.
More in the Design & craft kit
- Logo to vector kit – A PNG logo becomes a clean SVG, plus favicon and app icons.
- Brand palette – Pull a palette from a logo or photo, build a scale, write the codes down.