Color Contrast Checker

Try an example:

Use #RGB or #RRGGBB, without transparency.

Contrast ratio
5.74 : 1
Normal text
AA PassAAA Fail
Large text (18pt / 24px, or 14pt bold)
AA PassAAA Pass
Preview

This is sample body text to judge readability at a glance.

Large Text Sample

WCAG 2.2 thresholds: normal text AA ≥ 4.5, AAA ≥ 7; large text AA ≥ 3, AAA ≥ 4.5.

color: #666666; background-color: #ffffff;

What is Color Contrast Checker?

Enter the text and background colours (pickers or hex) to get the contrast ratio and AA/AAA verdicts: normal text needs 4.5 (AA) or 7 (AAA), large text 3 / 4.5.

One click walks the text colour towards black or white until AA for normal text passes.

Worked example: grey text that narrowly misses AA

Choose “Muted text” to compare #777777 with #ffffff. The ratio is about 4.48:1: large text passes AA, but normal text does not. The verdict uses the full calculated ratio, not the rounded two-decimal display.

Choose “Darker text” to change the foreground to #767676. Its ratio is about 4.54:1, which passes normal-text AA but not AAA. “Fix to AA” also searches towards black or white while holding the background fixed; it does not guarantee the smallest colour change or a match to your brand palette.

#777777 on white: normal-text AA fails
#767676 on white: normal-text AA passes
Compare the examples above
Text / backgroundRatioNormal AANormal AAA
#777777 / #ffffff4.48:1FailFail
#767676 / #ffffff4.54:1PassFail
#ffffff / #1e293b14.63:1PassPass

Read the four WCAG text verdicts

This checker uses WCAG 2.2 contrast ratios for text, computed from sRGB relative luminance. The ratio is (lighter luminance + 0.05) / (darker luminance + 0.05), ranging from 1:1 for identical colours to 21:1 for black and white.

Large text means at least 18pt (24 CSS px) at normal weight, or 14pt (about 18.667 CSS px) when bold. Visual size, font choice and thin strokes still affect readability. A near-threshold colour deserves extra margin rather than rounding a failing value up to a pass.

WCAG text contrast thresholds
Text sizeAA minimumAAA minimum
Normal text4.5:17:1
Large text3:14.5:1

What this colour-pair check does not cover

Inputs accept opaque three- or six-digit hexadecimal colours. Transparent text, images, gradients and overlays need their actual composited colours checked at the text location. For text crossing a gradient, checking only its two endpoints can miss a worse contrast in the middle.

Passing this pair is not a full accessibility audit. Check actual font size and weight, hover and focus states, links, icons, focus indicators and colour-only instructions separately. Non-text components have their own requirements; these four badges are for text.

Invalid input leaves the last valid result visible with an error message. Correct both colours before using the verdict. Swapping colours preserves the ratio but changes the preview, which is useful for considering a light or dark design.

Frequently asked questions

What counts as large text?

WCAG defines large text as 18pt (24px) regular, or 14pt (18.66px) bold and above.

References and example checks

Examples checked against this tool: .