Skip to main content

Color Contrast Checker

Check the WCAG contrast ratio between foreground and background colors.

Last updatedHow we build & check our tools
Results will appear here once you enter your values.

What the checker measures

Pick a foreground and background color, or paste 3- or 6-digit hex values such as #1e293b or fff, and the checker computes the WCAG 2.x contrast ratio between them. The ratio compares relative luminance — perceived brightness, not hue — so it runs from 1:1 for identical colors to 21:1 for black on white, and it is floored to two decimals, so a pair at 4.499:1 is never shown as a passing "4.50:1".

You get four verdicts at once: AA for normal text (4.5:1), AAA for normal text (7:1), AA for large text (3:1) and AAA for large text (4.5:1). A live preview renders large, normal and small sample text in your two colors, so you can judge the pair as text before you commit to it.

Using it on real design decisions

Use the color pickers for quick experiments, or paste hex values straight from your design tokens or stylesheet. The preview updates as you type, and the Swap button flips the two colors — handy for previewing a dark-mode variant, though the ratio itself never changes when you swap.

Typical jobs: choosing the darkest brand tint that still passes 4.5:1 on white, checking white button labels on a colored call-to-action, validating a dark-mode surface pair, or proving a token combination meets AA before it lands in a design system. You can also share or bookmark a link that pre-fills both colors, which keeps a contrast decision traceable in code review or a ticket, and a Copy button puts the ratio and both hex values on your clipboard for the audit notes.

What the four verdicts do not cover

The verdicts cover text only, and the tool does not ask your font size or weight — you decide which row applies. Large text means at least 24px, or at least 18.66px bold; a 20px semibold heading is normal text and needs 4.5:1. The math also assumes two opaque sRGB colors: text with opacity, or over images and gradients, must be flattened to the color that actually renders before you test it, and hover, focus and disabled states each need their own check.

Logos and disabled controls are exempt from WCAG, so a low ratio on them may be fine. And a pass here is not a conformance claim: contrast is one requirement among many, and a passing ratio does not guarantee the text is legible.

Frequently Asked Questions

Common questions about the Color Contrast Checker

At least 24px (18pt) at regular weight, or at least 18.66px (14pt) bold. Everything smaller — including most headings at common web sizes — is normal text and needs 4.5:1 for AA. The checker shows the normal and large verdicts side by side, so pick the row that matches your rendered font size and weight, measured in browser dev tools rather than eyeballed.

Sources & References

Contrast (Minimum) 1.4.3

Text needs a contrast ratio of at least 4.5:1, or 3:1 for large text. These are the thresholds the checker tests against.

Non-text Contrast 1.4.11

Icons, borders and other interface parts need at least 3:1 against the colours next to them.