Free tool
Colour contrast checker
Check two colours, or a whole palette, against WCAG 2.2. If a pair fails, we show you the nearest colour that passes.
- WCAG 2.2, AA and AAA
- Text, large text and non-text
- Runs in your browser
What do you want to check?
Check a whole palette
Paste your brand colours and see which combinations pass before anyone designs with them. The example is our own palette.
The result
6 of 12 pairs pass AA for normal text.
Every pair, graded for normal text
Each row is a text colour. Each column is the background it sits on.
- AAA 7:1 or more
- AA 4.5:1 or more
- Large only 3:1 or more
- Fail under 3:1
| Text colour | On Ink | On Cream | On Yellow | On Coral |
|---|---|---|---|---|
| Ink as text#0B0C10 | Same colour | Passes AAA18.56 to 1 | Passes AAA14.13 to 1 | Passes AAA8.53 to 1 |
| Cream as text#FAF9F6 | Passes AAA18.56 to 1 | Same colour | Fail1.31 to 1 | Fail2.17 to 1 |
| Yellow as text#FFD84D | Passes AAA14.13 to 1 | Fail1.31 to 1 | Same colour | Fail1.65 to 1 |
| Coral as text#FF8A7A | Passes AAA8.53 to 1 | Fail2.17 to 1 | Fail1.65 to 1 | Same colour |
How it works
Contrast, explained
Everything here comes from WCAG 2.2. Each part links to the W3C page it is based on.
| What | AA needs | AAA needs |
|---|---|---|
| Normal text | 4.5:1 (1.4.3) | 7:1 (1.4.6) |
| Large text: 24px, or 18.66px bold, and above | 3:1 (1.4.3) | 4.5:1 (1.4.6) |
| Parts of controls, and graphics you need to understand | 3:1 (1.4.11) | No AAA level |
| Logos, and incidental or inactive text | No requirement | No requirement |
The ratio compares how bright two colours are. WCAG calls this relative luminance: 0 for the darkest black, 1 for the lightest white. The ratio is the lighter colour's luminance plus 0.05, divided by the darker colour's luminance plus 0.05.
It runs from 1:1, two identical colours, to 21:1, black on white. The figure is never rounded up: 4.499:1 does not meet 4.5:1. This checker rounds down for the same reason.
Source:Understanding 1.4.3 Contrast (Minimum), W3C (opens in new tab)
Large text is at least 18 point, or at least 14 point and bold. WCAG uses the CSS point, and 1 point is 1.333 pixels. So large means about 24px, or about 18.66px when bold. W3C rounds the bold figure to roughly 18.5px.
Anything smaller is normal text, and needs 4.5:1 for AA.
Source:Understanding 1.4.3 Contrast (Minimum), W3C (opens in new tab)
Non-text contrast covers what you need to see to find and use a control, such as a text field's border or a checkbox, and its states. It also covers the parts of a chart or icon you need to understand it. Each needs 3:1 against the colours next to it.
Source:Understanding 1.4.11 Non-text Contrast, W3C (opens in new tab)
- Text that is part of a logo or brand name.
- Text in an inactive control, such as a disabled button.
- Text that is pure decoration, that nobody can see, or that is part of a picture with other important things in it.
Under 1.4.11, inactive controls are exempt too, and so are controls whose look comes from the browser and has not been changed.
Source:Understanding 1.4.3 Contrast (Minimum), W3C (opens in new tab)Understanding 1.4.11 Non-text Contrast, W3C (opens in new tab)
WCAG works out contrast so that hue is not a key factor: it depends on how light or dark each colour is. W3C notes that hue and saturation have little or no effect on how easily text is read.
So the usual way to pass is to make one colour lighter or darker, not to change it to another colour. The checker keeps the hue and saturation and moves the lightness by as little as it takes, so the suggestion still looks like your colour.
Source:Understanding 1.4.3 Contrast (Minimum), W3C (opens in new tab)
The three W3C pages this checker is built on:Understanding 1.4.3 Contrast (Minimum), W3C (opens in new tab)Understanding 1.4.6 Contrast (Enhanced), W3C (opens in new tab)Understanding 1.4.11 Non-text Contrast, W3C (opens in new tab)
Questions about contrast
Fixed price before any work starts
Want a person to check the rest?
Contrast is one of the 55 things we test at Level A and AA. A quick scan covers your 5 most important templates in 5 working days, for £495 plus VAT.