Skip to content
YouNeed Tools
Free VPN

Colour Contrast Checker (WCAG 2.2)

Enter a text colour and a background to see the contrast ratio, whether it passes WCAG AA and AAA, and the closest colour that would.

Normal text: The quick brown fox jumps over the lazy dog.

Large text (24px)

Large bold text (18.66px bold)

Button outline

Contrast ratio

4.54:1

WhatNeedsResult
AA normal text4.5:1Pass
AA large text3:1Pass
AAA normal text7:1Fail
AAA large text4.5:1Pass
UI parts and icons (1.4.11)3:1Pass

Nearest colours that pass

Text colour for AAA (7:1): #595959 (7.00:1)

Checked on your device.

Rules as of November 26, 2026: WCAG 2.2 (W3C Recommendation, 12 December 2024), success criteria 1.4.3, 1.4.6 and 1.4.11, and its definitions of relative luminance and contrast ratio.

Worked example: grey text and a bright brand orange

The popular light grey #777777 on white has a ratio of 4.47:1, just under the 4.5:1 that AA needs for body text, so it fails. The nearest passing grey is #767676 at 4.54:1, a change hardly anyone would notice. A bright orange #ff6b35 on white manages only 2.83:1, which fails even the 3:1 allowed for large headings and button outlines. For text it has to darken to about #cd4c1a (4.52:1). Keep the bright orange for backgrounds behind dark text, or for decoration.

What the success criteria ask for

CriterionLevelApplies toMinimum
1.4.3 Contrast (Minimum)AANormal text / large text4.5:1 / 3:1
1.4.6 Contrast (Enhanced)AAANormal text / large text7:1 / 4.5:1
1.4.11 Non-text ContrastAAIcons, input borders, focus rings, chart lines3:1 against what is next to them

Logos and brand names, disabled controls and purely decorative text are exempt. Text over a photo must meet the ratio against the part of the photo behind it; a dark overlay usually helps.

The maths

Each 0–255 channel is divided by 255, then turned back into linear light: values up to 0.04045 are divided by 12.92, larger ones become ((value + 0.055) ÷ 1.055)2.4. Relative luminance is 0.2126 × red + 0.7152 × green + 0.0722 × blue, reflecting how much brighter green looks than blue. The contrast ratio is (L1 + 0.05) ÷ (L2 + 0.05), where L1 is the lighter colour. Black on white scores 21:1; white on #767676, the darkest grey that is still often used, scores 4.54:1.

Contrast in dark mode

Dark designs need the same ratios. Pure white on pure black (21:1) can look harsh and blur for some readers; a light grey on a dark grey, such as #e5e5e5 on #1f1f1f, is easier on the eyes and still passes AAA comfortably. Check muted text, placeholders and borders separately, because those are the colours that most often fail.

Who needs to meet these rules

In the US, the Department of Justice’s 2024 rule under the Americans with Disabilities Act requires state and local government websites to meet WCAG 2.1 level AA, and courts often use the same standard for businesses. In the UK, public sector websites must meet WCAG 2.2 AA under the accessibility regulations, and the European Accessibility Act applies similar requirements to many products and services sold in the EU from June 2025. Even where no law applies, readable text helps everyone: people reading in sunlight, on a cheap screen, or with ageing eyes. Checking contrast takes a minute and fixing it usually means only a slightly darker shade.

Related tools

Sources

Checked on November 26, 2026:

Frequently asked questions

What contrast ratio do I need?
For WCAG 2.2 level AA: 4.5:1 for normal text and 3:1 for large text, icons, form borders and focus indicators. For level AAA: 7:1 for normal text and 4.5:1 for large text. AA is the level most accessibility laws and policies refer to.
What counts as large text?
At least 18 point (24 CSS pixels) for regular weight, or 14 point (about 18.66 CSS pixels) for bold. Most body text is smaller, so it needs 4.5:1.
Is 4.49:1 close enough to pass?
No. The thresholds are exact, and WCAG says not to round up. The ratio shown here is cut to two decimals, never rounded up, so a pass is always a real pass.
How is the contrast ratio calculated?
Each colour’s relative luminance is worked out from its red, green and blue values after undoing the screen’s gamma curve, weighted 21% red, 72% green and 7% blue. The ratio is (lighter + 0.05) ÷ (darker + 0.05), from 1:1 (no contrast) to 21:1 (black on white).
How does the nearest passing colour work?
It keeps the hue and saturation of your colour and changes only its lightness, darker or lighter, until the ratio passes, then picks whichever is closer to the original. The search runs in OKLCH, a colour space where equal steps look equal, so the suggestion looks as close to your colour as possible.
Does it check colour blindness?
Contrast in WCAG is about lightness, which is what people with colour vision deficiencies rely on, so a passing pair stays readable. Don’t use colour alone to carry meaning, for example red and green for errors and success; add text or icons.

Last updated: 2026-11-26