Contrast Checker

Check whether your text is actually readable by measuring the contrast ratio between any two colours against the WCAG accessibility standards. Enter a foreground and a background and you get the exact ratio plus pass/fail badges for AA and AAA at both normal and large text sizes, alongside a live preview showing what the combination really looks like. When a pair fails, the tool suggests the nearest colour that passes — adjusted in lightness only, so your hue survives. This is the check that catches the most common accessibility failure on the web: mid-grey body text on white, which looks fine to a designer on a good monitor and is genuinely hard to read for a lot of people. It is pure arithmetic in your browser, so nothing is uploaded.

WCAG 2.1 contrast thresholds

ContentLevel AALevel AAA
Normal text (under 24px)4.5:17:1
Large text (24px, or 18.66px bold)3:14.5:1
UI components and graphics3:13:1
Disabled controls and decorationExemptExempt

When to use it

  1. Verify body text meets WCAG AA before shipping a design.
  2. Check that a button's label is readable against its fill colour.
  3. Audit a brand palette and find which pairings are safe to use for text.
  4. Find the nearest accessible shade when a brand colour fails.
  5. Confirm an icon or input border meets the 3:1 non-text requirement.

How to Use

  1. Set a foreground and a background colour, by picker or by typing any CSS colour.
  2. Read the ratio and the AA/AAA pass-fail badges for normal and large text.
  3. Check the live preview to see how the pairing actually reads.
  4. If it fails, apply the suggested nearest passing colour, or swap the two and re-check.

Features

  1. Exact WCAG 2.1 contrast ratio, 1:1 to 21:1
  2. AA and AAA pass/fail for normal and large text
  3. Non-text UI component 3:1 check (criterion 1.4.11)
  4. Semi-transparent foregrounds composited before measuring
  5. Nearest passing colour suggested, preserving hue
  6. Live preview at both normal and large sizes
  7. 100% client-side — nothing is uploaded

FAQs

What ratio do I actually need?

For WCAG AA, which is what most accessibility policies and legislation reference, you need 4.5:1 for normal text and 3:1 for large text. AAA raises that to 7:1 and 4.5:1. Non-text elements that carry meaning — icons, input borders, focus rings — need 3:1 under criterion 1.4.11.

What counts as large text?

At least 18.66px (14pt) if bold, or at least 24px (18pt) at normal weight. It is a lower bar because larger glyphs have thicker strokes and more area, so they stay legible at a contrast that would be too low at body size.

Does it handle transparency?

Yes, and correctly. A semi-transparent foreground is composited over the background before the ratio is measured. Checking the raw colour instead would report a contrast nobody can actually see, which is a common way for automated audits to be quietly wrong.

How is the suggested colour chosen?

It keeps your hue and saturation and moves only the lightness, stepping toward both black and white until the target ratio is met, then returns whichever passing colour changed least. That keeps a brand colour recognisably itself rather than swapping it for an unrelated one that happens to pass.

Does passing WCAG mean my design is accessible?

It means this one thing is right. Contrast is a necessary condition, not a sufficient one — font size, line height, focus indicators, keyboard navigation and screen-reader semantics all matter too. A high ratio on unreadable typography is still unreadable.

Is anything uploaded?

No. The luminance and ratio calculations are local arithmetic. No colour or palette you enter is sent to a server, logged, or stored.

Technical Details

Each colour's relative luminance is computed the way WCAG 2.1 defines it: every sRGB channel is divided by 255, linearised (values at or below 0.03928 are divided by 12.92, the rest are raised to the power 2.4 after the ((c + 0.055) / 1.055) transform), then weighted 0.2126 red, 0.7152 green and 0.0722 blue to reflect how much each contributes to perceived brightness. The contrast ratio is (lighter + 0.05) / (darker + 0.05), which ranges from 1:1 for identical colours to 21:1 for black on white. A semi-transparent foreground is alpha-composited over the background before measurement, because a ratio measured on the raw colour is one the reader can never actually see. The result is checked against success criteria 1.4.3 (AA: 4.5:1 normal, 3:1 large), 1.4.6 (AAA: 7:1 and 4.5:1) and 1.4.11 (non-text UI components: 3:1). The suggestion feature walks the foreground's HSL lightness toward black and toward white until the target is met and returns whichever passing colour moved least, so hue and saturation survive.

Color Tools

Color Tools

  • Color Mixer
  • Color Palette Generator
  • Color Shades & Tints Generator
  • Tailwind Color Palette Generator
  • Color Blindness Simulator
  • Color Converter