Color contrast checker

WCAG 2.2 Level AA needs a contrast ratio of at least 4.5:1 for normal text, and 3:1 for large text and for buttons, form fields and icons. Enter a text color and a background color to get the exact ratio, a pass or fail at AA and AAA, and the nearest color that passes.

Published . Last reviewed .

Free · No signup · Runs entirely in your browser. The colors you enter are never uploaded

Contrast calculator

Hex or rgba(), e.g. #14120D or #14120D80.

0 is fully see-through, 100 is solid. See-through text is blended over the background before it is measured.

Hex, e.g. #FCFBF6. It has to be a solid color: a see-through background has no contrast until you know what is behind it.

Large text looks like this

Normal body text looks like this. Contrast is what decides whether someone with low vision can read it at all.

A checkbox outline and a text field outline, drawn in the text color. Interface edges like these are the 3:1 case.

n/a

Contrast ratio, shown rounded down to two decimals; pass/fail uses the exact value, so a borderline pair can read 4.49 and fail 4.5:1 by a hair.

Nearest passing color

If the pair fails, this finds the closest color that passes. Each suggestion keeps the color's hue and changes only its lightness, as little as it takes, and is measured again after rounding to a real hex color, so the number you see is the number you get. See-through text is the one exception: browsers blend transparency a little differently from this page, so a suggestion that leaves the text see-through aims a small margin above the target.

What are you aiming for?

Enter two colors above to see suggestions.

    Check the real text on your live pages

    This pair passes or fails on paper. Starter monitoring checks the color contrast of rendered text on up to 20 pages of your site every week, where both colors can be read, and lists what it finds in your dashboard. Its email alerts cover new critical or serious issues in the page code. Coverage is limited to the pages you monitor and the text it can read.

    What the thresholds mean

    WCAG 2.2 contrast minimums for text and interface elements
    What it applies toLevel AALevel AAA
    Normal text (under 18pt, or under 14pt bold)4.5:17:1
    Large text (18pt+, or 14pt+ bold)3:14.5:1
    UI components and meaningful graphics3:1No higher requirement
    Disabled controls and purely decorative graphicsExemptExempt

    These come from WCAG success criteria 1.4.3 Contrast (Minimum), 1.4.6 Contrast (Enhanced) and 1.4.11 Non-text Contrast.

    What this tool can and can't do

    This checks one pair of colors you give it: a text or graphic color, optionally semi-transparent, on one solid background. On its own it can't see your live page, and neither can our site scanner, which reads your HTML but has no way to compute what actually gets painted (what we check). Working out the real contrast of rendered text needs a browser that has already resolved styles, layers, opacity and background images, and any tool that claims to find every contrast problem from HTML alone is guessing.

    To measure real rendered text on any page, use our accessibility bookmarklet, which runs the checks in your own browser on the page you are looking at. For text sitting on a photo, gradient or screenshot, use the image contrast checker. Both are free.

    Limits of this checker in particular:

    • It uses the WCAG 2.2 contrast ratio formula only. Other methods, such as APCA, give different numbers and are not included.
    • Opacity is blended in plain sRGB, the way browsers paint it, but a browser rounds the blended color to whole 8-bit values in its own way. In Edge that moved the real ratio by up to 0.15, usually by far less, which is why suggestions for see-through text keep a small margin. It does not account for opacity on a parent element, blend modes, filters, text shadows, gradients or images.
    • It can't tell you which row applies to your design: whether text counts as large, whether a graphic is needed to understand the page, or whether a control is disabled or purely decorative and so exempt.
    • Passing here says nothing about the rest of the page. Contrast is one requirement among many.

    Contrast checker FAQ

    What contrast ratio does WCAG require?

    At Level AA, which is what laws usually point to: 4.5:1 for normal text and 3:1 for large text (1.4.3), and 3:1 for the parts of controls and graphics people need to see (1.4.11). Level AAA raises text to 7:1, and 4.5:1 for large text (1.4.6).

    What counts as large text?

    Text of at least 18 point, or at least 14 point if it is bold. W3C's Understanding 1.4.3 page puts those at about 24px and 18.5px in CSS pixels.

    Does a ratio of 4.49:1 pass?

    No. W3C says the ratio should not be rounded: "4.499:1 would not meet the 4.5:1 threshold". This checker shows the ratio rounded down for display but decides pass or fail on the exact value.

    Do logos and disabled buttons need to meet contrast?

    No. WCAG 1.4.3 says text that is part of a logo or brand name has no contrast requirement, and neither does text in an inactive control, pure decoration, or text that is part of a picture with significant other content.

    How do I check text on top of a photo or gradient?

    A single pair of colors can't describe a photo. Use the image contrast checker, which measures the worst-case contrast across everything behind your text. For a live page, the accessibility bookmarklet measures the colors your browser actually draws.

    What about APCA and WCAG 3?

    WCAG 3 is still a W3C draft, and the laws in our accessibility laws table point to WCAG 2, whose contrast formula this checker uses. APCA, a different contrast method, gives different numbers and is not part of WCAG 2.2.

    Is a colour contrast checker the same thing?

    Yes. Colour is the British spelling, and the WCAG rules and this tool are the same either way. Our color contrast guide explains the ratios, the formula and the common mistakes in more depth.

    Contrast is the part machines are good at

    The part they're bad at is judgment: whether your alt text is true, whether your link text means anything out of context. That's what GotAlt was built for.

    Check if my alt text is actually right

    Contrast is one check of many

    The free scan runs 16 rule-based WCAG checks on up to 3 pages of your site: missing alt text, form labels, headings, page language, link text and more. No signup.

    Scan my site for free