Color Contrast Checker WCAG

Pick foreground and background colors to get your contrast ratio and instant WCAG AA and AAA pass/fail results for normal text, large text, and UI components.

Free Tool

Quick Answer

What contrast ratio is needed for WCAG AA compliance?

WCAG AA requires a contrast ratio of at least 4.5 to 1 for normal text (under 18pt) and 3 to 1 for large text (18pt or larger, or 14pt bold). UI components and graphics need 3 to 1. The stricter WCAG AAA level requires 7 to 1 for normal text. Black on white achieves the maximum ratio of 21 to 1.

Foreground (text)

Background

Accessible presets

Normal Text Sample -- the quick brown fox jumps over the lazy dog.

Large Text Sample (24px Bold)

UI Component

Contrast Ratio

14.63:1

Rating

Excellent

7:1 or higher

1:13:14.5:17:121:1

WCAG Compliance

LevelRequiredResult
WCAG AA Normal text4.5:1PASS
WCAG AA Large text3:1PASS
WCAG AAA Normal text7:1PASS
WCAG AAA Large text4.5:1PASS
UI Components / Icons3:1PASS

Color Details

Foreground

HEX #1E293B

RGB 30, 41, 59

HSL 217, 33%, 17%

Luminance 0.0218

Background

HEX #FFFFFF

RGB 255, 255, 255

HSL 0, 0%, 100%

Luminance 1.0000

About this tool

This color contrast checker calculates the WCAG contrast ratio between any two colors and shows instant pass or fail results for every relevant accessibility level. It checks WCAG AA and AAA compliance for normal text, large text, and UI components, displays a live preview of how text looks on the chosen background, shows the full color details including RGB, HSL, and relative luminance, and suggests the nearest accessible foreground color when your combination fails the 4.5 to 1 threshold.

The tool is useful for web designers building accessible interfaces, developers implementing design systems, UX teams auditing existing color palettes, and anyone creating content that needs to meet accessibility standards. WCAG 2.1 AA compliance is legally required for many websites under the ADA in the US and the Web Accessibility Directive in the EU. Using this checker during the design process is faster and cheaper than fixing contrast issues after launch.

How it works

  1. 1

    Choose your colors

    Use the color pickers or type hex codes directly. The tool syncs both inputs instantly. Use the swap button to reverse foreground and background, or pick a preset accessible combination from the palette list.

  2. 2

    Read the contrast ratio

    The contrast ratio updates live with every change. The ratio scale runs from 1:1 (same color, no contrast) to 21:1 (black on white, maximum contrast). A rating label shows Fail, Poor, Good, or Excellent at a glance.

  3. 3

    Check the WCAG table

    Five compliance checks run automatically: WCAG AA and AAA for normal and large text, plus UI components. Each shows PASS or FAIL. The preview box shows real text at 16px and 24px bold so you can see the visual result.

  4. 4

    Fix failing combinations

    If your combination fails AA for normal text, click Suggest accessible foreground. The tool binary-searches the lightness scale to find the closest color that passes 4.5:1 and lets you apply it with one click.

WCAG contrast requirements

LevelText sizeMinimum ratioUse case
WCAG AANormal (under 18pt / 24px)4.5:1Body text, navigation, form labels, captions
WCAG AALarge (18pt+ or 14pt+ bold)3:1Headings, hero text, large display copy
WCAG AAANormal (under 18pt / 24px)7:1Critical content, medical and government sites
WCAG AAALarge (18pt+ or 14pt+ bold)4.5:1Enhanced large text for maximum accessibility
WCAG AAAny size3:1UI components, icons, form borders, focus rings

Common contrast failures

Color combinationApprox. ratioWhy it failsBetter alternative
Gray (#999) on white2.85:1Below the 3:1 minimum for any text#595959 on white (7:1, passes AAA)
Yellow (#ffff00) on white1.07:1Nearly identical luminance, invisibleBlack (#000) on yellow (#ffff00)
Light blue (#87ceeb) on white1.9:1Very similar luminance to white#005fa3 on white (passes AA Normal)
Light gray (#ccc) on white1.60:1Far below the 3:1 minimum#767676 on white (passes AA Normal)
Red (#f00) on green (#0f0)1.28:1Low contrast and unusable for colorblind usersBlack on white or dark navy on yellow
White (#fff) on yellow (#ff0)1.07:1Both colors have very high luminanceBlack (#000) on yellow (12.6:1)

Frequently asked questions

What is WCAG color contrast?
WCAG (Web Content Accessibility Guidelines) color contrast requirements ensure text is readable for people with visual impairments including color blindness. WCAG 2.1 requires a minimum contrast ratio of 4.5 to 1 for normal text and 3 to 1 for large text at the AA level. The stricter AAA level requires 7 to 1 for normal text.
What is a good contrast ratio for web design?
A contrast ratio of 4.5 to 1 or higher is required for WCAG AA compliance for normal text. A ratio of 7 to 1 or higher meets the stricter WCAG AAA standard. For large text (18pt or 14pt bold), 3 to 1 is the minimum. Most accessibility-focused designers aim for at least 4.5 to 1 for all text.
What is the difference between WCAG AA and AAA?
WCAG AA is the standard required by most accessibility laws and guidelines worldwide, including ADA and EN 301 549. It requires 4.5 to 1 contrast for normal text. WCAG AAA is the enhanced level requiring 7 to 1 for normal text and is recommended for critical content like government and healthcare sites but is not legally mandated in most jurisdictions.
Does color contrast affect SEO?
Color contrast does not directly affect search engine rankings but it impacts Core Web Vitals indirectly through user engagement metrics. Poor contrast increases bounce rates and reduces time on page. Google Lighthouse flags contrast failures in accessibility audits. Many accessibility requirements are also becoming legal requirements in the US and EU.
What colors should I avoid for accessibility?
Avoid low contrast combinations like light gray text on white, yellow text on white, or light blue on white. Red and green combinations are problematic for colorblind users. Pure red on black and pure green on black also often fail WCAG. Always test your actual hex values rather than relying on visual judgment alone.
How is contrast ratio calculated?
Contrast ratio is calculated using the relative luminance of each color. Luminance converts RGB values to a linear scale accounting for how human eyes perceive brightness. The ratio is then (lighter luminance + 0.05) divided by (darker luminance + 0.05). The result ranges from 1 to 1 (no contrast) to 21 to 1 (black on white).
What contrast ratio does black text on white background have?
Black (#000000) on white (#ffffff) has a contrast ratio of 21 to 1, which is the maximum possible contrast ratio. White on black is the same ratio. Both pass WCAG AA and AAA at all text sizes. This is why black and white remains the gold standard for readable text.
Are there legal requirements for color contrast?
Yes. In the United States, the ADA (Americans with Disabilities Act) requires WCAG 2.1 AA compliance for many websites. The EU Web Accessibility Directive requires AA compliance for public sector websites. Many private companies now also require AA compliance to reduce legal risk. Non-compliance can result in lawsuits and regulatory penalties.

Related guides

Related tools