ToolSnap
Utilities

Color Contrast Checker

Check the contrast ratio between any two colors and instantly see if they pass WCAG AA and AAA accessibility standards for normal and large text.

The quick brown fox jumps over the lazy dog. (Normal text)

Large text — 24px bold

Contrast ratio

AA — Normal text

Requires 4.5:1

AA — Large text

Requires 3:1

AAA — Normal text

Requires 7:1

AAA — Large text

Requires 4.5:1

How to use

Pick colors using the color pickers or type hex codes directly. The contrast ratio and WCAG results update in real time. The preview shows how your text/background combination looks at normal and large text sizes.

Use Swap to flip foreground and background — the contrast ratio is the same either way, but it helps visualise both combinations.

Use cases

  • Validating text and background color pairs in a design system
  • Checking button label contrast before shipping a UI component
  • Meeting WCAG 2.1 AA requirements for public-sector or enterprise web apps
  • Auditing an existing site's color palette for accessibility compliance
  • Choosing accessible brand colors that pass contrast requirements

Limitations

This tool calculates contrast ratio for solid colors only. Semi-transparent colors, gradients and complex backgrounds require manual inspection or browser-based accessibility tools like the Chrome DevTools accessibility panel.

Contrast ratio alone does not guarantee legibility — font weight, letter spacing, and typeface also affect readability at any given ratio.

Frequently asked questions

What is color contrast ratio?
Contrast ratio measures the luminance difference between two colors on a scale from 1:1 (no contrast, identical colors) to 21:1 (maximum contrast, black on white). It is calculated using the relative luminance formula from the WCAG 2 specification.
What contrast ratio do I need for accessibility?
WCAG 2.1 defines two levels: AA (minimum) requires 4.5:1 for normal text and 3:1 for large text (18pt+ or 14pt bold). AAA (enhanced) requires 7:1 for normal text and 4.5:1 for large text. Most projects target AA compliance.
What counts as large text for WCAG?
Large text is defined as 18pt (24px) or larger for regular weight, or 14pt (approx 18.67px) or larger for bold text. UI components and decorative elements are exempt from contrast requirements.
Does contrast ratio apply to icons and UI elements?
WCAG 1.4.11 (Non-text Contrast) requires a 3:1 ratio for UI components like buttons, inputs and icons that convey information. This applies to the component boundary against its background.
My design fails AA — what should I do?
Darken the text color or lighten the background (or vice versa) until the ratio reaches 4.5:1. Use this tool to test variants in real time. Tools like Figma's accessibility plugins can also flag issues during design.

Related tools