Color Contrast Calculator — WCAG Ratio Checker Free | GadgetSurge

Calculate WCAG contrast ratio between two hex colors. Check AA and AAA pass/fail for normal and large text. Free accessibility checker.

About Color Contrast Calculator

Color contrast is a foundational requirement for accessible web design. WCAG 2.x specifies minimum contrast ratios between text and its background so content remains readable for users with low vision or color deficiency.

This calculator computes the contrast ratio using the official WCAG relative luminance formula. Enter any two hex colors and instantly see whether the combination passes WCAG AA and AAA thresholds for both normal and large text.

The live preview swatch shows sample body and heading text rendered with your chosen colors — so you can evaluate aesthetics and accessibility together before updating your CSS or design system.

Pair this tool with the Color Converter and Image Color Picker to sample colors from designs and verify they meet accessibility standards.

How to Use Color Contrast Calculator

  1. Enter foreground (text) and background hex colors using the color pickers or hex inputs.
  2. Preview sample text on the live swatch to see how the combination looks.
  3. Click "Check Contrast" to calculate the WCAG contrast ratio.
  4. Review AA and AAA pass/fail results for normal and large text.

Common Use Cases

Frequently Asked Questions

What is WCAG AA?

WCAG Level AA is the most commonly required accessibility standard. It requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt+ regular or 14pt+ bold).

What is WCAG AAA?

WCAG Level AAA is the highest conformance level. It requires 7:1 for normal text and 4.5:1 for large text. AAA is recommended but not always legally required.

How is the contrast ratio calculated?

The ratio is (L1 + 0.05) / (L2 + 0.05) where L1 and L2 are the relative luminances of the lighter and darker colors, computed from sRGB values using the WCAG 2.x formula.

What counts as large text?

Large text is 18 point (24px) and larger at normal weight, or 14 point (18.67px) and larger at bold weight. Large text has lower contrast requirements because bigger glyphs are easier to read.

Does contrast ratio apply to icons and UI components?

WCAG also requires 3:1 contrast for UI components and graphical objects. This tool focuses on text contrast; use the 3:1 threshold as a guide for non-text elements.

Can I use shorthand hex (#RGB)?

Yes. Both #RGB and #RRGGBB formats are accepted. Shorthand hex is expanded automatically (e.g. #FFF → #FFFFFF).