Skip to content
Tools Without AI

Prefer toolswithoutai.com in Google Search so our tools and guides show up more often. Google has to confirm it — we cannot set this for you.

Contrast Checker

Check WCAG color contrast ratio between foreground and background in your browser. Your data never leaves your device. Free and private.

No uploads. No account. Free to use.

Foreground #111111

Background #ffffff

18.88:1

AA normal pass · AAA pass

Sample text on this pair.

Prefer toolswithoutai.com

Opens Google’s picker with toolswithoutai.com pre-filled.

Under the Hood: The Architecture of WCAG Color Contrast Checker

Contrast APIs that screenshot a URL upload the page. This checker takes two hex colors, converts to sRGB, computes relative luminance per WCAG 2, and reports the ratio against AA 4.5:1 and AAA 7:1. All math is local. No design file is stored.

Memory Allocation & Browser Threading Mechanics

Two strings and six numbers. Recalculation is synchronous on input. There is no canvas except the live sample text. Main thread cost is negligible.

Algorithmic Deep-Dive: Code Snippet & Logical Analysis

function luminance(r, g, b) {
  const lin = [r, g, b].map((c) => {
    const s = c / 255;
    return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
  });
  return 0.2126 * lin[0] + 0.7152 * lin[1] + 0.0722 * lin[2];
}
const ratio = (Math.max(L1, L2) + 0.05) / (Math.min(L1, L2) + 0.05);

The 0.05 offset is specified by WCAG. Hex is parsed to 8-bit channels. Invalid hex falls back through a normalizer so the color input does not crash. Sample text uses the pair as CSS color/background for a visual check next to the numeric ratio.

The Local Storage Sandbox & Volatile Data Pipelines

No persistence. Hex strings live in useState. Leaving the page drops them.

Verifying True Privacy: How to Audit Your Browser's Network Tab

F12, Network, clear, change colors. Zero color-API calls. The ratio is CPU, not a contrast SaaS.

  • Files never leave your device
  • Runs entirely in your browser
  • No signup required
  • Free

What is Contrast Checker?

Contrast Checker calculates the luminance contrast ratio between two colors and reports WCAG AA/AAA compliance. Calculation is local.

Key features

  • WCAG 2.1 compliant
  • 100% client-side

How to use it

  1. Open the tool.
  2. Enter foreground and background colors.
  3. See the ratio and pass/fail status.

When to use it

Use when ensuring text is readable against backgrounds for accessibility compliance.

In this family

Color tools — related tools in the same cluster.

Frequently asked questions

Related tools

More in Color tools.