AudioRemover
Choose language: English

Contrast Checker

Pick a text color and a background color to see the contrast ratio and whether it passes WCAG AA or AAA.

  • No upload

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

Contrast ratio

—

    Normal text needs 4.5:1 and large text needs 3:1.

    How to use it

    1. Enter the text and background colors as hex values.
    2. Read the ratio and the AA and AAA results.
    3. Adjust one color until the pair passes.

    Formats and limits

    Check the WCAG contrast ratio of text and background colors, with AA and AAA results for normal and large text.

    Processing
    In your browser, no upload
    Output
    WCAG ratio · AA · AAA

    What the contrast ratio measures

    WCAG contrast compares two colors by relative luminance, not by hue. Each channel is linearized, then weighted 0.2126 red, 0.7152 green and 0.0722 blue, and the lighter luminance is divided by the darker, both plus 0.05. The result runs from 1:1 for identical colors to 21:1 for black on white. Because luminance ignores hue, a saturated red and a dark green can land at the same ratio even though they look different.

    The thresholds that matter

    WCAG 2.2 AA asks for 4.5:1 for normal text and 3:1 for large text, icons and form borders. AAA raises those to 7:1 and 4.5:1. A ratio below 3:1 fails every level. These numbers are minimums, not targets: body copy at 4.5:1 is compliant but can still feel thin on a bright screen, so interfaces often aim higher for long reading.

    Contrast checker showing a dark text color on white, a 17.74 to 1 ratio and passing AA and AAA badges
    The checker reports the ratio and each WCAG level separately.

    What counts as large text

    Large text means at least 24 CSS pixels (18 points) at normal weight, or 18.66 pixels (14 points) when bold. A 20 px heading therefore gets the 3:1 threshold, while 16 px body copy needs 4.5:1. Font weight and letter spacing affect legibility too, but the rule itself is based on size.

    Why the ratio and the feel differ

    The formula uses average luminance, while human vision responds differently to thin strokes, glare and motion. Small text at exactly 4.5:1 can look washed out on a phone outdoors, and text over a gradient or photo has no single ratio at all. Color blindness changes which hues separate, not the luminance math, so a pair can pass and still be hard to read.

    Fixing a failing pair

    Adjust lightness first: darken the text or lighten the background. Keep hue and saturation when the brand depends on them, then check again. Do not rely on color alone to signal state; add an icon or an underline. Test links, placeholders, disabled buttons and focus rings too, since non-text contrast follows the same 3:1 rule.

    Contrast in video and thumbnails

    Captions, lower thirds and thumbnail text follow the same principle. Put a solid plate or a dark scrim behind the words instead of hoping the footage stays dark, and measure the final frame rather than the design file. White text on a 60% black scrim usually reads more reliably than white text directly on video.

    What the checker does not do

    It checks two solid colors. Gradients, images, transparency and video vary across the frame, so sample the worst area. It does not measure font rendering, anti-aliasing or display calibration, and passing AA is a floor rather than a guarantee of comfort.

    Light and dark themes need separate checks

    A pair that passes in light mode does not automatically pass in dark mode. Inverting the background changes every luminance relationship: a brand blue that clears 4.5:1 on white can fall below 3:1 on a near-black surface. Check each theme separately, including hover states and placeholder text, and treat the result as a floor rather than a finished design.

    Common questions

    Is 4.5:1 enough for all text?

    It is the WCAG AA minimum for normal-size text. Large text can pass AA at 3:1, while AAA asks for 7:1 and 4.5:1. Text at exactly 4.5:1 is compliant but can still look thin on a bright screen.

    What counts as large text?

    At least 24 CSS pixels at normal weight, or 18.66 pixels when bold. A 20 px heading gets the 3:1 threshold, while 16 px body copy needs 4.5:1.

    Why can two colors with the same ratio look different?

    The formula uses relative luminance, which ignores hue. A saturated red and a dark green can land at the same ratio while feeling different to read. Font weight, glare and color vision also matter.

    Does this check text over images or gradients?

    No. It compares two solid colors. For photos and video, sample the lightest or busiest area, or add a scrim and check the resulting pair.

    Does the checker upload anything?

    No. The calculation happens in the page, so no color values or files leave your device.