Color Contrast Checker

Calculate foreground and background contrast ratios compliant with WCAG 2.1 AA and AAA standards, and get smart suggested compliant color adjustments.

Color Inputs
Lightness53%
Lightness100%
Contrast Ratio5.17 : 1
Normal Text (less than 18pt/24px) (WCAG AA - 4.5:1)PASS
Large Text (18pt/24px or larger) (WCAG AA - 3:1)PASS
Normal Text (less than 18pt/24px) (WCAG AAA - 7:1)FAIL
Large Text (18pt/24px or larger) (WCAG AAA - 4.5:1)PASS
UI Components & Graphical Objects (3:1)PASS

Interactive Preview Canvas

Large Header Typography

This is a sample normal paragraph (16px) demonstrating the selected contrast combination.

35.220 viewsYour data is processed in your browser and never sent to a server.

Related tools

JSON Formatter
Validate, beautify and minify JSON online. Everything runs in your browser — free and private.
Base64 Converter
Encode or decode Base64 text instantly in your browser. Free and private.
URL Encoder
Encode or decode URLs and query strings instantly in your browser. Free and private.
Color Picker
Pick any color and instantly get its HEX, RGB and HSL codes for CSS and design tools. Free, private, runs in your browser.

Get to know this tool

What is the Color Contrast Checker Tool?

Color Contrast Checker is a free web utility that calculates the contrast ratio between a text (foreground) color and a background color, then tells you whether that combination meets the WCAG 2.1 accessibility guidelines. Just like every tool on this site, it runs entirely inside your browser — your color values are never sent to any server.

How the Contrast Ratio Is Calculated

The tool follows the official WCAG formula:

  1. Each color's relative luminance is calculated from its sRGB values using the standard linearization curve and the 0.2126 / 0.7152 / 0.0722 coefficients for red, green, and blue.
  2. The contrast ratio is then computed as (L1 + 0.05) / (L2 + 0.05), where L1 is the luminance of the lighter color and L2 is the luminance of the darker one.
  3. The result is a ratio between 1:1 (no contrast, identical colors) and 21:1 (maximum contrast, pure black on pure white).

Key Features of Color Contrast Checker

  • Live Color Pickers: Pick your text and background colors with the built-in color pickers, or type a hex code directly (3-digit shorthand like #000 or full 6-digit like #000000, with or without the #).
  • Instant Sample Preview: See your actual text and background combination rendered live, so you know exactly what readers will see.
  • Full WCAG 2.1 Breakdown: The tool checks your ratio against all four official thresholds at once — AA Normal Text (4.5:1), AA Large Text (3:1), AAA Normal Text (7:1), and AAA Large Text (4.5:1) — and marks each as PASS or FAIL.
  • Invalid Input Handling: If you type an incomplete or invalid hex code, the tool clearly flags it instead of showing a misleading result.
  • Fully Offline & Private: All calculations happen locally in your browser. There are no network requests, no tracking, and no data ever leaves your device.

How to Use This Tool?

  1. Choose your text color using the color picker or by typing a hex code.
  2. Choose your background color the same way.
  3. Instantly read the calculated contrast ratio and see whether it passes the AA and AAA levels for both normal-sized and large text.
  4. Adjust either color until you reach the accessibility level you need, using the live sample preview to check readability.

Understanding WCAG AA and AAA Levels

  • AA (minimum, widely required level): 4.5:1 for normal text, 3:1 for large text (18pt+ or 14pt+ bold).
  • AAA (enhanced level): 7:1 for normal text, 4.5:1 for large text.

Meeting at least AA is recommended for any public-facing website to ensure text remains readable for users with low vision or color-vision deficiencies.

Why Choose Our Client-Side Tool?

Many online contrast checkers send your color values to a remote server to perform the calculation. This tool computes everything locally using your browser's own math engine, so there is zero network latency and zero risk of your design choices being logged anywhere.