Color · Made a little simpler

Contrast checker

Check foreground and background colors against WCAG 2.2 AA and AAA contrast thresholds. Include transparency on an explicit canvas, preview text, and export a report.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Use a CSS color name, HEX, RGB/RGBA, or HSL/HSLA. Transparent colors are composited on the chosen canvas before calculation.

9.60:1WCAG 2.2 contrast ratio
UseMinimumResult
Normal text · AA4.5:1Pass
Normal text · AAA7:1Pass
Large text · AA3:1Pass
Large text · AAA4.5:1Pass
Essential UI and graphics · AA3:1Pass

Pass/fail uses the unrounded ratio. Large text means at least 24 CSS px, or about 18.67 CSS px when bold. UI contrast depends on the actual adjacent colors; this pair alone cannot establish full WCAG conformance.

Make every word easy to read.

Preview uses normal text thresholds. Effective background: #FFFFFF (rounded for display).

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Contrast checker: how to use it

  1. Enter text and background colors as CSS color names, HEX, RGB, or HSL.
  2. Choose the opaque canvas behind transparent colors, then review the contrast results.
  3. Preview normal or large text, swap colors, and copy or download the report.

Limits and notes

Uses the WCAG sRGB relative-luminance calculation with unrounded ratios for pass/fail. Large text is at least 24 CSS pixels or about 18.67 pixels when bold. This checks a solid color pair; gradients, images, actual font rendering, adjacent UI colors, and full accessibility conformance require separate review.

How your privacy works →

Contrast checker: common questions

Why does 4.50:1 sometimes fail?

The displayed ratio is rounded to two decimal places. The decision uses the full unrounded value, so a ratio just below 4.5 still fails the normal-text AA threshold.

How does transparency affect the result?

The background is composited on the selected opaque canvas first. Text is then composited on that effective background before contrast is calculated. A different canvas can change the result.

How do I check color contrast?

Enter the actual Text color and Background color, choose the opaque canvas behind any transparency, then read the automatically updated ratio and appropriate threshold row. Use the real component’s colors and context.

What ratios do WCAG AA and AAA require for text?

The tool compares normal text with 4.5:1 for AA and 7:1 for AAA, and large text with 3:1 for AA and 4.5:1 for AAA. These are inclusive unrounded comparisons; determine the real criterion’s applicability separately.

Tool guides