DESIGN · FREE TOOL

Color contrast checker

Convert a color ↓

Check two opaque hex colors against WCAG 2.2 contrast thresholds.

On-device processing · No account · No ads

Files and entered values are processed in your browser, without uploading them to Toolfred. Our tools do not automatically save your work or send it to embedded analytics.

Pages, libraries and shared reference files still download from our host. Downloads you save, browser recovery and hosting logs have separate retention. Local processing is not a guarantee of anonymity or secure deletion.

See where data goes →

Opaque #RGB or #RRGGBB only. No alpha, gradients, images, CSS names or automatic background detection.

A color-pair check, with the thresholds visible.

Each 8-bit sRGB channel is divided by 255, then linearized: c / 12.92 when c ≤ 0.04045; otherwise ((c + 0.055) / 1.055)^2.4. Relative luminance is 0.2126R + 0.7152G + 0.0722B. Contrast is (lighter luminance + 0.05) / (darker luminance + 0.05). Black against white is 21:1; identical colors are 1:1.

AA text thresholds are 4.5:1 for normal text and 3:1 for large text. Large means at least 18pt regular or 14pt bold, approximately 24px or 18.67px in CSS. AAA text thresholds are 7:1 and 4.5:1. Pass/fail uses the unrounded value, even if the displayed ratio rounds up.

For example, #777777 on #FFFFFF is about 4.48:1 and fails AA normal text; #767676 is about 4.54:1 and meets that threshold. A non-text 3:1 result is only a numeric check. Whether a particular control, boundary, graphic or state must meet it depends on the actual interface.

Sources: W3C luminance formula, text contrast, enhanced text contrast and non-text contrast. This is not certification of an entire page or a prediction of readability on every display.

MORE WITH THIS TOOL

Convert a color

Convert HEX, RGB, HSL and OKLCH, with alpha and explicit sRGB clipping.

Convert a color inputs

For RGB/HSL/OKLCH, enter three comma-separated numbers and optional alpha 0–1. Example RGB: 114,185,255,0.8. No CSS function wrappers or named colors.

Preparing local controls. Reload if they stay inactive.

RESULT

Enter your inputs to see the result.

Out-of-gamut OKLCH is clipped by RGB channel, with a visible warning. This is not perceptual gamut mapping, print CMYK or Pantone matching. Method / format reference. Reviewed October 23, 2026. Working inputs stay in this page; downloads and hosting request logs have separate retention.