WCAG Color Contrast Checker

This checker calculates the relative luminance contrast ratio for two sRGB colors and compares the result with common WCAG thresholds.

Last updated: October 17, 2026  •  Published by: NOFYI Editorial Team  •  Category: design-tools

Workspace

What Is the WCAG Color Contrast Checker?

The WCAG Color Contrast Checker measures the contrast ratio between a text color and its background color, using the formula in the Web Content Accessibility Guidelines (WCAG). The ratio runs from 1:1 (no contrast, for example white text on a white background) to 21:1 (black text on a white background, the maximum). Designers and developers use it to check whether text is readable enough for people with low vision or color vision differences.

How to Use the WCAG Color Contrast Checker

  1. Pick the foreground (text) color and the background color as hex values, for example #000000 text on #FFFFFF background.
  2. Enter both colors in the workspace box, for example as "#000000 on #FFFFFF".
  3. Click Process.
  4. Compare the resulting ratio with the WCAG thresholds: 4.5:1 for normal text at AA, 3:1 for large text at AA, and 7:1 for normal text at AAA.
  5. Cross-check with a real contrast calculation, because the workspace on this page currently echoes your input instead of computing a ratio (see Limitations).

Worked Example

Black text (#000000) on a white background (#FFFFFF) has a contrast ratio of 21:1, the highest possible. It passes WCAG AA and AAA for normal text and large text. A second pair, medium gray text #767676 on a white background, has a ratio of about 4.54:1. That passes AA for normal text (needs 4.5:1) but fails AAA for normal text (needs 7:1). For reference, when "#000000 on #FFFFFF" was entered in the workspace, the observed workspace output was only an echo: "Wcag Color Contrast Checker Input: #000000 on #FFFFFF Length: 18 characters Processing complete!" It did not return the correct ratio of 21:1.

Limitations

The workspace on this page is a generic placeholder: it echoes the input text and its character length and does not compute a contrast ratio or a pass/fail result. Do not treat its "Processing complete!" message as a pass. A ratio alone also does not guarantee readability: font size, font weight, text over images, color-only meaning, and user settings such as forced colors all matter. The checker also does not test color blindness, focus indicators, or non-text contrast such as icons and controls, which have their own WCAG criteria.

Frequently Asked Questions

What ratio do I need for normal body text?

WCAG AA requires at least 4.5:1 for normal text. WCAG AAA requires at least 7:1 for normal text.

What counts as large text?

WCAG defines large text as at least 18 point (24 px), or 14 point (about 18.66 px) bold. Large text needs only 3:1 at AA and 4.5:1 at AAA.

Does passing a ratio mean the design is accessible?

No. Contrast is one requirement. You still need readable font sizes, text that is not conveyed by color alone, visible focus states, and real user testing.

Why does the workspace show "Processing complete!" without a ratio?

The workspace is a placeholder that echoes the input and its character length. It does not calculate contrast. Use the worked example above, or a dedicated contrast tool, until the workspace is replaced with a real calculation.