Contrast checker

Find the nearest passing colour without losing your brand hue.

Contrast

2.83Very poor
Small textfails
Large textfails

Fails every threshold. The nearest passing colour is below.

Type
Size
Weight
WCAG 22.83:1fail

needs 4.5:1 for body text at AA

APCALc 54fail

At Lc 54 this weight needs at least 29px. Either raise contrast to Lc 90 or set the size to 29px.

Quote n. 11

Everyone is a genius at least once a year. The real geniuses simply have their bright ideas closer together.

Georg Christoph Lichtenberg

Nearest passing colours

Ranked by how little the colour moves. Hue is held in every suggestion, so the result still reads as your brand.

2.83:14.50:1
What moved
The text
Lightness
12%
Hue
Unchanged
Perceptual shift
ΔE 12.6

Darken the text by 12%, hue and saturation unchanged. A ΔE under 10 is a change most people would not name if they had not been told — which is the point: the pair passes and the brand survives.

Text lightnessL 68.2%

Nearest passing lightness is 11.2% away.

Background lightnessL 100.0%

Nearest passing lightness is 67.9% away.

In short

To fix a contrast failure without losing your brand colour, move the colour along its own lightness axis rather than picking a new one. Hue survives a lightness change, so the result still reads as your brand. This tool finds the smallest such move, checks it against both WCAG 2 and APCA, and shows you the result at the size and weight you are actually shipping.

What contrast checker is

A tool that measures the luminance relationship between a text colour and its background and reports it against a conformance threshold. This one also searches for the nearest colour that would pass, holding your hue, so the output is a replacement value rather than a verdict.

What this tool does that others do not

  • It returns a colour, not a cross

    The lightness track draws the axis for your specific hue: the passing stretches are shown clearly, the rest is veiled, and your current colour is marked. Suggestions are ranked by CIEDE2000, so the smallest visible change comes first. Moving the background is offered too, which is often the smaller compromise when the brand colour is the text.

    #4a9fe8 on white measures 2.83:1. Holding hue 247° and chroma and moving OKLCH lightness from 0.682 to 0.567 gives #207bc1 at 4.50:1.

  • WCAG 2 and APCA at the same time

    WCAG 2 cannot see that one colour is about to be set in 12px Light and the other in 32px Bold, so it gives both the same answer. APCA takes size and weight as inputs. Both are shown with the disagreement named, because conformance is measured against one and readability is better predicted by the other.

    APCA will not pass 14px at regular weight at any contrast, including pure black on pure white. It needs 16px, or bold. WCAG 2 waves that caption through.

  • It is honest about dark mode

    The WCAG 2 formula adds a fixed 0.05 flare constant that dominates at the dark end, so pairs near black can post a passing ratio while reading as dim. On dark backgrounds the tool says to trust the APCA figure instead of the ratio.

How to use it

  1. Put in the pair you are actually shipping

    Not the pair from the style guide. The failure you are trying to fix belongs to a specific foreground on a specific background.

  2. Set the size and weight

    The threshold moves: 4.5:1 for body text, 3:1 once text reaches 24px or 18.66px bold, and 3:1 for interface components such as input borders and focus rings under 1.4.11.

  3. Take the nearest passing colour, not a new one

    The first suggestion is the smallest perceptual move that clears the threshold. It keeps the hue, so the result still reads as the same colour to anyone who knows the brand.

  4. Treat a bare pass as a warning

    The ratio is a threshold, not a score. Clearing it by 0.01 is not meaningfully different from failing by 0.01, and the pair will fail the moment someone sets it a little smaller.

Worked examples

Real input, real figures.

A brand blue that has to stay a brand blue

You give it

#4a9fe8 as 16px regular text on #ffffff.

You get

2.83:1 — fails AA. The nearest passing colour at the same hue and chroma is #207bc1 at 4.50:1, reached by moving OKLCH lightness 0.682 → 0.567. Hue is unchanged at 247°, so it still reads as the same blue.

A pair that cannot be fixed by moving the text

You give it

A saturated yellow as text on white, targeting AAA.

You get

No lightness on that hue reaches 7:1 against white — a saturated yellow tops out far below it. The tool says so and offers the background move instead, which is the answer nothing else suggests.

Against a typical online contrast checker

AspectThis toolA typical checker
On failureThe nearest passing colour at your hueA red cross
ModelsWCAG 2 ratio and APCA Lc togetherWCAG 2 only
Size and weightInputs, because APCA needs themNot asked
RankingCandidates sorted by CIEDE2000 distanceNo candidates
Dark modeFlags that the WCAG flare constant distorts dark pairsSame ratio, no caveat

Guides and measurements

What the ratio means

A contrast ratio compares the relative luminance of two colours on a scale from 1:1 to 21:1. Black on white is 21:1. The same colour on itself is 1:1. WCAG 2 asks for 4.5:1 on body text, relaxing to 3:1 once text reaches 24px, or 18.66px when it is bold. Interface elements — input borders, focus rings, icons that carry meaning — need 3:1.

The number is not a score. It is a threshold, and clearing it by 0.01 is not meaningfully different from failing by 0.01. Treat a bare pass as a warning that the pair will fail the moment someone sets it a little smaller.

Why this tool shows two numbers

WCAG 2 looks only at the two colours. It cannot see that one of them is about to be set in 12px Light and the other in 32px Bold, so it gives both the same answer. Anyone who has shipped a passing caption that turned out to be unreadable has met this limitation directly.

APCA — the candidate algorithm for WCAG 3 — scores on a signed Lc scale and takes size and weight into account. It produces some uncomfortable results: 14px at regular weight cannot pass at any contrast, not even pure black on pure white. It needs 16px, or bold. WCAG 2 will wave that caption through.

Neither is authoritative on its own. WCAG 2 is what conformance is measured against today, and APCA is the better predictor of whether someone can actually read the thing. Where they disagree, ship to the stricter one.

Fixing a failure without losing the brand

The common advice — "pick an accessible colour" — is not advice. It skips the part that is hard, which is that the colour is usually not yours to change.

Contrast is driven overwhelmingly by lightness. Hue and saturation barely move it. That is useful, because it means you can hold the two properties that make a colour recognisable and adjust only the one that affects the measurement. The lightness track above draws that axis for your specific hue: the stretches that pass are shown clearly, the rest is veiled, and your current colour is marked. The fix stops being a guess and becomes a distance.

The suggestions are ranked by perceptual distance, using CIEDE2000, so the smallest visual change comes first. Moving the background is offered too — when the brand colour is the text, changing what sits behind it is often the smaller compromise, and it is the option most tools never mention.

Questions people ask

Straight answers. Each one links directly: copy the address after opening it.

What contrast ratio do I actually need?

4.5:1 for body text and 3:1 for large text (24px, or 18.66px bold) to meet WCAG 2 AA. AAA asks for 7:1 and 4.5:1. Interface components like input borders and icons need 3:1 under success criterion 1.4.11.

Why do WCAG 2 and APCA disagree?

WCAG 2 compares two colours and ignores everything else, so a 12px hairline caption and a 32px bold heading in the same colours score identically. APCA weighs size and weight, because a thin glyph puts less ink on screen and reads as lower contrast at the same ratio. The disagreement is loudest on small thin text and on dark backgrounds.

Can I keep my brand colour and still pass?

Usually, yes. Contrast is driven mainly by lightness, and hue survives a lightness change. Moving your colour along its own lightness axis is almost always enough, and it leaves the colour recognisable. Occasionally it is not enough — a saturated yellow can never reach 7:1 against white — and then the honest answer is to change the background instead.

Does WCAG 2 work for dark mode?

Not reliably. The formula adds a fixed 0.05 flare constant that dominates at the dark end, so pairs near black can post a passing ratio while reading as dim. APCA was built partly to fix this. On dark backgrounds, trust the APCA figure.