Color Contrast Checker

Test text and background colors against WCAG AA and AAA with a live preview

  • 100% Free
  • Files stay private
  • Works in your browser
Try it now·Color Contrast Checker

Colors

Pick your text and background colours, or paste any hex value.

Required
Required

Contrast result

Live WCAG ratio, AA/AAA pass-fail, and a readable-text preview.

Contrast ratio

17.40:1

Foreground
#1a1a1a
Background
#ffffff

AA · Normal text

Requires ≥ 4.5:1

Pass

AA · Large text

Requires ≥ 3:1

Pass

AAA · Normal text

Requires ≥ 7:1

Pass

AAA · Large text

Requires ≥ 4.5:1

Pass

Live preview

The quick brown fox jumps over the lazy dog. Normal body text at ~16px shows how comfortably readable this pairing is for paragraphs and UI labels.

The quick brown fox jumps over the lazy dog.

Large text is defined by WCAG as ≥ 24px, or ≥ 18.66px when bold.

Everything runs in your browser. Your colours never leave this page. Ratios follow the WCAG 2.1 relative-luminance formula.

How it works

  1. Pick two colors

    Click the swatch under Foreground (text) or Background to open the picker, then choose a color or type a hex code.

  2. Read the contrast ratio

    The Contrast ratio updates as you change colors, with Pass or Fail for AA and AAA on normal and large text. Press Copy ratio to copy it.

  3. Check the live preview

    The Live preview shows sample text in your two colors, so you can judge by eye whether the pairing is comfortable to read.

Check whether two colors are readable together before they ship. This tool computes the WCAG contrast ratio between a foreground and background color, shows pass or fail for AA and AAA at both normal and large text sizes, and previews real text in your chosen colors so you can judge it by eye too.

What Is Color Contrast Checker?

Color Contrast Checker is a free accessibility tool that measures the contrast ratio between a text color and its background using the official WCAG formula. It returns a single ratio, expressed like 4.5:1 or 7:1, then maps that number to the four thresholds that matter: AA and AAA for normal text, and AA and AAA for large text. A live preview renders sample words in your exact colors so the math and your own eyes agree. Pick colors with the swatches or type hex values, and every result updates instantly, all inside your browser.

Who Benefits from This Tool

  • UI designers choosing a palette: confirm body text clears the 4.5:1 AA bar before handing off a mockup.
  • Front-end developers implementing a theme: verify button and link colors pass against their backgrounds.
  • Accessibility auditors: document exact ratios and pass/fail results for a WCAG conformance report.
  • Content and email marketers: make sure captions and call-to-action text stay legible for every reader.
  • Product teams building a design system: lock in text-on-surface pairings that meet a chosen conformance level.
  • Educators teaching web accessibility: show how a small lightness change flips a failing pair into a passing one.

Key Features

  • WCAG contrast ratio: the exact ratio between foreground and background, calculated from relative luminance.
  • Four pass/fail badges: clear results for AA and AAA at both normal and large text.
  • Live text preview: sample text rendered in your colors so you can judge legibility directly.
  • Color pickers and hex entry: choose visually with swatches or type precise hex codes.
  • Instant recalculation: every result and badge updates the moment you change a color.
  • Swap control: flip foreground and background to test the reverse pairing quickly.

How to Use

  1. Set the foreground (text) color using the swatch or by typing a hex value.
  2. Set the background color the same way.
  3. Read the contrast ratio shown between the two colors.
  4. Check the AA and AAA badges for normal and large text to see what passes.
  5. Adjust either color and watch the live preview and badges update until you hit your target level.

Common Use Cases

  • Confirming body text meets AA (4.5:1) before finalizing a brand palette.
  • Testing a link color against a colored section background rather than plain white.
  • Checking whether light gray placeholder text is actually readable.
  • Documenting contrast results for an accessibility or compliance audit.
  • Deciding between two heading colors by comparing their ratios on the same background.

Tips and Best Practices

  • Aim for AA (4.5:1) as a baseline for body text and AAA (7:1) when you need extra headroom.
  • Remember that large text (roughly 18pt, or 14pt bold) passes AA at a lower 3:1 ratio.
  • Test against the real background a color will sit on, including gradients' lightest and darkest points.
  • Do not rely on color alone for meaning; pair it with text or icons for readers who cannot distinguish hues.
  • Nudge lightness rather than hue when a pair narrowly fails. A small luminance change often gets you over the line.

Limitations and Notes

All calculations run in your browser and nothing is uploaded. The tool checks the WCAG 2 contrast ratio between two solid colors, which does not account for opacity, overlapping layers, background images, or text drawn over a photo. For those, test against the actual pixels behind the text. WCAG's ratio is also a proven but imperfect model of readability; passing the threshold is the standard requirement, yet very thin fonts or unusual color pairs can still feel hard to read, so use the live preview as a second check.

FAQs

WCAG AA requires 4.5:1 for normal text and 3:1 for large text, while AAA requires 7:1 for normal and 4.5:1 for large. The tool shows a badge for each of these so you can see exactly which levels your pair meets.

Large text is generally 18pt (about 24px) or larger, or 14pt (about 18.66px) and bold. Because larger characters are easier to read, they are held to a lower contrast requirement.

No. The contrast ratio and all pass/fail checks are computed locally in your browser, so the colors you enter never leave your device.

It uses the WCAG formula based on the relative luminance of each color: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color. The result ranges from 1:1 for identical colors up to 21:1 for pure black on pure white.

The checker compares two solid colors, so it does not factor in alpha transparency. If your text or background uses opacity, calculate the effective blended color first and test that value instead.

It meets the measurable WCAG standard, which is what conformance requires. However, font weight, size, and spacing also affect legibility, so use the live text preview alongside the ratio to confirm the result looks right.

More Website Management Tools

Other tools in Website Management Tools.

All Website Management Tools