Color Contrast Checker

No account, nothing uploaded

Enter a foreground and a background colour to get the exact contrast ratio and whether it clears WCAG AA and AAA. Everything runs in your browser.

Result
12.51
contrast ratio
Your Target7:1 PASS
Large TextAA PASSAAA PASS
Small TextAA PASSAAA PASS
UI ElementsAA PASS
Target Ratio : 1
16px

Enter two colours, get the exact ratio and whether it clears WCAG — plus a suggested fix when it does not.

Threshold

AA is 4.5:1

For normal text. Large text — 18pt, or 14pt bold — only needs 3:1.

Threshold

AAA is 7:1

The stricter level, 4.5:1 for large text. Worth targeting for long-form reading.

Often missed

Controls need 3:1 too

WCAG 1.4.11 covers buttons, inputs and focus rings, not just text. A hairline border rarely qualifies.

Fix

A suggested pair

When a combination fails, the tool proposes the nearest passing variant, so you keep the hue.

Passing is a floor, not a goal. Exactly 4.5:1 is legible, not comfortable. The ratio also says nothing about hue, so two colours can pass and still be an unpleasant pairing.

How a contrast ratio is calculated

The ratio compares the relative luminance of two colours, weighting red, green and blue for how sensitive the eye is to each. Green contributes most and blue least, which is why a mid blue on black is harder to read than a mid green on black.

The scale runs from 1:1 to 21:1, pure black on pure white. Nothing exceeds 21:1, so 12:1 is already a comfortable margin.

Every threshold in one place

What it isAAAAA
Body text, under 18pt4.5:17:1
Large text — 18pt, or 14pt bold3:14.5:1
Icons, borders, focus rings, charts3:13:1
Logos and genuinely disabled controlsexemptexempt

The exemption for disabled controls is narrow: it applies to a control that cannot be operated at all, not one that merely looks muted.

The failures that come up most

  • Placeholder text as a label. Usually around 2.5:1, and it disappears once the field is filled in.
  • Light grey secondary text. #999 on white is 2.8:1 — the most common failure on a marketing site.
  • White text on a brand colour. Most mid-tone brand blues, greens and oranges land between 2:1 and 4:1 against white.
  • Focus rings. A 1px hairline rarely reaches 3:1, and it is the indicator keyboard users depend on.
  • Text over an image or gradient. Test the lightest and darkest point the text can sit over, and add a scrim if either fails.
  • Hover and visited states. The resting state gets checked; the others do not.

Where the number stops helping

A ratio is blunt. It treats a thin 300-weight face and a bold 700-weight face as identical, and it does not model the way light text on a dark background reads as heavier than the same pair inverted. APCA, the candidate replacement drafted for WCAG 3, accounts for weight, size and polarity, but it is not a requirement anywhere yet. Ship against the numbers above, then use judgement.

Frequently asked questions

Is this free?

Yes, with no account and no limit on how many pairs you check.

Does anything get uploaded?

No. The calculation runs in your browser; no colour you enter reaches a server.

What counts as large text?

18pt and above, or 14pt bold — roughly 24px and 18.66px. It needs 3:1 for AA rather than 4.5:1.

Does this cover non-text elements?

Yes. Icons, form borders and focus indicators need 3:1 under WCAG 1.4.11.

What is a good contrast ratio?

4.5:1 passes for body text, but treat it as the floor. Around 7:1 is comfortable for long-form reading.

Do logos have to pass?

No. Logotypes are exempt under WCAG, as is text inside a photograph. The exemption covers the mark, not the navigation beside it.

How do I fix failing text without abandoning the brand colour?

Keep the hue and move the lightness. Darkening by 15 to 25 per cent usually clears 4.5:1 on white, and the original stays usable for fills and borders, where only 3:1 applies.

Does dark mode need checking separately?

Yes. Contrast is a property of a pair, so every pair changes when the background does. Palettes that pass in light mode routinely fail on secondary text in dark mode.

Related tools

Build a palette that passes from the start with the colour palette generator, or apply it as a CSS gradient. For dedicated accessibility software, browse digital product design tools.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.