calculatory.app

Color Contrast Checker

Test any two colors against WCAG AA and AAA, see them in context, and get the nearest shade that passes.

Colors

Accepts hex (#1a73e8, #fff) or rgb(26, 115, 232). Colors are treated as fully opaque.

Result

7.00:1

Passes AA and AAA for all text sizes.

Large text sample

Normal body text at 16px. Readable contrast helps everyone, including people with low vision and anyone reading in bright sunlight.

ButtonIcon and border use the text color
Normal text · AA (4.5:1)
Large text · AA (3:1)
Normal text · AAA (7:1)
Large text · AAA (4.5:1)
UI components & graphics · AA (3:1)

How contrast is calculated

WCAG measures contrast from relative luminance: how bright a color appears to the human eye. Each sRGB channel is linearised, then weighted by how sensitive our eyes are to it — green counts far more than blue — to give a luminance between 0 and 1.

The contrast ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color's luminance. The 0.05 accounts for ambient light reflecting off a screen. Because the formula is symmetric, swapping text and background never changes the ratio, though it can change how heavy the text looks.

Every result here is compared against the exact WCAG thresholds with no rounding, and the displayed ratio is truncated to two decimals so a near miss never reads as a pass.

Common questions

What contrast ratio does WCAG require?

WCAG 2.x sets two levels. Level AA, the usual legal and procurement target, requires at least 4.5:1 for normal text and 3:1 for large text. Level AAA, the enhanced level, requires 7:1 for normal text and 4.5:1 for large text. The ratio runs from 1:1 (identical colors) to 21:1 (black on white).

What counts as large text?

WCAG defines large text as at least 18 point (24px) at regular weight, or at least 14 point (about 18.66px) when bold. Anything smaller is normal text and needs the stricter ratio. Thin or decorative typefaces can look smaller than their size suggests, so treat borderline cases as normal text.

Do buttons, icons and form borders need contrast too?

Yes. Success criterion 1.4.11 Non-text Contrast, added in WCAG 2.1, requires 3:1 against adjacent colors for the visual boundaries of interactive components, such as input borders and focus indicators, and for graphics needed to understand content, such as meaningful icons and chart lines. Disabled controls, purely decorative graphics and logos are exempt.

Why does 4.47:1 fail when it is so close to 4.5:1?

WCAG thresholds are exact minimums, so a ratio is never rounded up to reach them. This checker truncates the displayed value rather than rounding it: #777777 on white is 4.4776:1, so it shows 4.47 and fails AA, while #767676 is 4.54:1 and passes. Tools that round up can report a pass that an accessibility audit will not.

How are the suggested colors chosen?

The suggestion keeps your text color's hue and saturation and adjusts only its lightness, searching both darker and lighter directions and returning the smallest change that meets the threshold. That keeps the result recognisably your brand color. If no lightness of that hue can reach the target against your background, the checker says so instead of guessing.

What about APCA and WCAG 3?

APCA is a newer contrast method that accounts for font weight, size and polarity, and it has been proposed for the future WCAG 3. WCAG 3 is still a draft, however, and accessibility laws and procurement standards such as Section 508 in the US and EN 301 549 in Europe reference WCAG 2.x. The 2.x ratio calculated here is the one audits check against today.

Can I check semi-transparent colors?

Not directly — this checker treats both colors as fully opaque, which is what the WCAG formula assumes. For a semi-transparent text or overlay color, first blend it with the background it actually sits on, then check the resulting solid color.

Gaurav Yadav

Built by Gaurav Yadav

Designer, author, and the one person behind Calculatory. Contrast is calculated locally in your browser — nothing you enter is sent to a server. More about the project.

Last updated: September 2026