Accessibility

Color Contrast Checker

Check the contrast ratio of text and background colors against WCAG AA and AAA.

Accessibility

Why Use the Color Contrast Checker?

Use this color contrast checker to test any text and background pair against the WCAG accessibility guidelines in one view. It calculates the exact contrast ratio and shows pass or fail for all four standard thresholds: AA normal text at 4.5:1, AA large text at 3:1, AAA normal text at 7:1 and AAA large text at 4.5:1. A live mock page renders your colors as real headings and paragraphs, helping designers, developers and content teams catch unreadable combinations before launch.

How to Use the Color Contrast Checker

  1. Set the text color with the picker or by typing a HEX, rgb(), hsl() or CSS color name value.
  2. Set the background color the same way, using the exact value from your design or stylesheet.
  3. Read the contrast ratio and the four pass or fail results for AA and AAA, normal and large text.
  4. Press the swap button to preview the reversed pairing in the mock page, then adjust the lightness of one color until every level you need shows a pass.

Best For

  • Checking body text and link colors before a website launch or accessibility audit.
  • Testing white button labels against a brand color to see whether the button needs a darker shade.
  • Verifying that gray placeholder, caption or helper text is still readable on a light background.
  • Documenting approved text and background pairs in a design system with their contrast ratios.

Pro Tip

When a pair fails, change lightness rather than hue: darkening the text or lightening the background moves the ratio far more than shifting the color around the wheel. Watch out for gray text on white, since popular grays like #999999 fall below 4.5:1, while #767676 is roughly the lightest gray that still passes AA on pure white. Remember that the swap button does not change the ratio, because contrast is the same in both directions; it only lets you preview how the reversed design reads.

FAQ

Color Contrast Checker FAQ

What is a good color contrast ratio?

WCAG level AA requires at least 4.5:1 for normal text and 3:1 for large text, while level AAA requires 7:1 for normal text and 4.5:1 for large text. Ratios range from 1:1, which is the same color twice, up to 21:1 for black on white. Most websites aim for AA as a minimum.

How is a contrast ratio calculated?

Each color is converted to relative luminance, a measure of perceived brightness that weights green most heavily, then red, then blue. The ratio is the lighter luminance plus 0.05, divided by the darker luminance plus 0.05. The 0.05 accounts for ambient light reflecting off a screen.

What counts as large text for WCAG contrast?

WCAG treats text as large when it is at least 18 points, which is about 24px, at regular weight, or at least 14 points, about 18.66px, when bold. Large text only needs 3:1 for AA and 4.5:1 for AAA. Anything smaller must meet the normal text thresholds.

Are there exceptions to WCAG contrast requirements?

Yes. Logos and brand names in logos, purely decorative text, text in inactive or disabled controls and text that is part of a photo with other significant visual content are exempt. Everything users need to read or interact with, including links, labels and placeholder text, should meet the ratios.

Learn more

Guides for the Color Contrast Checker

How to Choose Accessible Button Colors Without Losing Brand Identity

Use contrast-aware button colors that still feel on-brand, clickable, and polished across light and dark interfaces.

Read Guide

Pass WCAG AAA on Your First Try

Fix inaccessible color palettes with clear contrast workflows and build interfaces everyone can enjoy.

Read Guide

How to Create Animated Gradient Backgrounds in CSS

Build an animated gradient in CSS with background-position keyframes, calm timing, prefers-reduced-motion support, GPU-friendly layers and @property angles.

Read Guide
Copied