Skip to content
Tool4SaaS
ToolsGuidesAboutContact
Tool4SaaS

125 fast, local utilities for developers and creators. No sign-ups — most tools run in your browser.

hello@tool4saas.com

Languages:

English

Español

Français

Categories

  • Text & Documents

  • Business & Writing

  • Developer Tools

  • Converters

  • Generators

  • Images & Design

  • PDF Tools

  • Calculators

  • Finance & Money

  • Health & Fitness

  • SEO & Marketing

  • Time & Date

Popular tools

  • Invoice Generator

  • QR Code Generator

  • Word Counter

  • JSON Formatter

  • Mortgage Calculator

  • Resume Builder

  • View all tools →

Learn

  • All Guides & Tutorials

  • Word Counter Guide

  • Invoice Generator Guide

  • QR Code Generator Guide

  • Resume Builder Guide

  • About Us

  • Author

  • Methodology

  • Contact Us

© 2026 Tool4SaaS. All rights reserved.

  • Privacy Policy

  • ·
  • Terms of Service

  • ·
  • ·
  • ·
  • llms.txt

  1. Home
  2. /
  3. Blog
  4. /
  5. Image Guide
  6. /
  7. WCAG Contrast Checker: Pass AA and AAA

WCAG Contrast Checker: Pass AA and AAA

Check a text and background pair against WCAG AA and AAA contrast thresholds, read the ratio correctly, and see which checks the tool cannot perform.

By Tool4SaaS Editorial Team · Published October 23, 2026 · Updated October 23, 2026 · 6 min read

Try it now — Color Contrast Checker, free in your browser

WCAG contrast for any two colors · No signup · No watermark · Free forever.

Open Color Contrast Checker →
On this page
  • How the ratio is calculated
  • The three badges
  • Reading a failed result
  • A short contrast workflow
  • What the checker cannot tell you

Contrast is not a matter of taste. WCAG compares the relative luminance of text and background, then expresses the result as a ratio from 1:1 to 21:1. A ratio of 1:1 means no difference; 21:1 is black on white. The color contrast checker accepts two hex colors, shows the ratio and reports three pass or fail badges. It is a quick check for a color pair, not a complete accessibility audit.

Part of the image and design guide. The tool checks text contrast only. It does not inspect icons, focus rings, charts, disabled controls or text placed over a photograph. Those need separate checks.

How the ratio is calculated

Each color is converted from hex to red, green and blue values. Every channel is divided by 255, linearized with a gamma correction, and combined into a relative luminance using the coefficients 0.2126, 0.7152 and 0.0722. The lighter luminance and the darker luminance are then inserted into (L1 + 0.05) / (L2 + 0.05). The order of the two colors does not matter because the formula always puts the lighter value on top.

TextBackgroundRatioWhat it means
#1a1a1a#ffffff17.40:1Passes AAA for normal text
#595959#ffffff7.00:1Meets the AAA normal-text threshold exactly
#767676#ffffff4.54:1Passes AA normal text, fails AAA normal text
#999999#ffffff2.85:1Fails AA normal text and AA large text
#ff5733#ffffff3.15:1Passes AA large only, not AA normal
#c2410c#ffffff5.18:1Passes AA normal text
#14b8a6#ffffff2.49:1Fails all three badges
#0f766e#ffffff5.47:1Passes AA normal text
#1e3a5f#f8fafc10.99:1Strong contrast without pure black or white
#334155#f8fafc9.90:1Passes AAA for normal text

The exact numbers matter at the boundaries. A ratio of 4.50 passes AA normal text, while 4.49 does not. The page displays two decimal places but compares the unrounded ratio, so rounding can hide a value just below a threshold. A displayed 4.50 is close enough that you should darken or lighten the pair slightly instead of relying on the display.

The calculation assumes opaque colors. A hex value has no alpha channel, so a translucent overlay must be composited against its real background before it is checked. A 50 percent black overlay on white is not the same as #808080 in every rendering context; compute the resulting solid color first, then enter that color here.

The three badges and the missing fourth check

WCAG sets different thresholds for different text sizes and levels:

LevelNormal textLarge text
AA4.5:13:1
AAA7:14.5:1

The tool shows AA normal at 4.5, AA large at 3 and AAA normal at 7. It does not show a separate AAA large badge. That is a real limitation, not a claim that AAA large does not exist. If you need AAA for large text, compare the ratio manually against 4.5.

Large text is generally at least 18 point regular or 14 point bold, which is about 24 pixels regular or 18.66 pixels bold. The tool does not know the font size, so the AA large badge is only a hint until you confirm the rendered size. A 16-pixel paragraph does not become large text because the badge says AA large passes.

The threshold also depends on what is being tested. Normal body copy needs the full 4.5 ratio at AA. Icons, borders and focus indicators are non-text elements with a different requirement, and the checker does not evaluate them. Placeholder text, error messages and link text inside a paragraph are text, so check them with their actual colors rather than assuming the surrounding body style covers them.

Reading a failed result

Start with the contrast ratio and identify which badge fails. A 3.15 ratio passes AA large but fails AA normal. That might be acceptable for a 24-pixel headline and unacceptable for a 16-pixel paragraph. The same color pair can be right for one role and wrong for another.

Do not automatically jump to pure black or pure white. The navy and off-white pair at 10.99:1 is easier on the eyes than 21:1 and still clears AAA for normal text. A gray such as #767676 is a common compromise at 4.54:1: it passes AA normal but fails AAA. A darker gray such as #595959 reaches 7.00:1 and clears AAA normal, but it may look heavier in a minimal interface.

For a brand color, change lightness before changing hue. Orange #ff5733 fails AA normal at 3.15:1, while a darker burnt orange such as #c2410c reaches 5.18:1 and passes. Teal #14b8a6 fails all three badges, while #0f766e reaches 5.47:1. The darker versions keep the hue family and give the text enough separation from white.

Test the actual pair, not the intended pair. A button may have a gradient, a hover overlay or a semi-transparent border that changes the effective background. A card may sit on an image. If the text lands on a photograph, sample the lightest and darkest areas or add a solid scrim; the checker can only evaluate two solid colors.

A short contrast workflow

  1. Enter the actual text color and background color as three- or six-digit hex values.
  2. Read the ratio and the three badges. Ignore the AA large badge until you know the rendered font size and weight.
  3. Identify the target: AA normal for body copy, AA large for confirmed large text, AAA normal for stricter body copy.
  4. Adjust one color at a time, usually by darkening the text or lightening the background, and recheck.
  5. Test hover, focus, visited, disabled and dark-mode variants separately.
  6. Check icons, borders and focus rings with a non-text contrast review after the text pair passes.

A useful habit is to record the ratio beside the design token. For example, body text on a page background might be 14.48:1, while secondary text on the same background might be 7.00:1. Naming the pair and its ratio makes later changes easier to review than a screenshot alone.

What the checker cannot tell you

It does not simulate color vision deficiency, measure perceived readability, inspect font weight or evaluate text over images. It does not save a palette, export a report or pick a color from the screen. The three-digit shorthand is expanded to six digits, so #fff and #ffffff produce the same result. Invalid hex input produces no numeric ratio and the preview falls back to a safe color.

Passing a ratio is necessary but not sufficient. A page can meet contrast thresholds and still be hard to read because of tiny type, tight spacing, long lines, motion or poor focus states. Use the checker as one gate in a broader accessibility review, not as a substitute for testing with real content and assistive technology.

Check a pair now: open the WCAG contrast checker, enter the text and background hex values, and confirm the intended text size before accepting a badge. Use the color converter when you need HEX, RGB or HSL values.

Frequently asked questions

No. It shows AA normal, AA large and AAA normal. AAA large requires 4.5:1, so compare the displayed ratio against 4.5 manually if that is your target.

No. The formula always uses the lighter luminance first, so swapping text and background produces the same ratio.

No. Only three- and six-digit hex values are accepted. Composite transparency against the final background first, then enter the resulting solid color.

No. It evaluates two solid colors. For text over a photo or gradient, test the lightest and darkest effective background areas or add a solid scrim and check that color.

No. Contrast is one requirement. Font size, spacing, focus visibility, motion, semantics and assistive-technology behavior still need separate review.

Done reading — open the Color Contrast Checker

WCAG contrast for any two colors — free in your browser, no signup.

Open Color Contrast Checker →

Keep reading in this guide

Pillar guide

Compress Images for Web Without Losing Quality: 80% Guide

In this silo

Resize Images to Exact Pixels Without Blur

In this silo

PNG to WebP Without Losing Transparency

In this silo

Image SEO: Size, Alt Text and Dimensions