← Text, SEO & Web Utilities

WCAG 2.1 Color Contrast & Luminance Checker

Calculate exact WCAG 2.1 relative luminance and contrast ratios (1:1 to 21:1) between any foreground and background hex colors for AA, AAA, and non-text UI compliance.

Quick Scenario Presets:
WCAG 2.1 Contrast Ratio
16.37 : 1 (PASS AA)
#1C1814 on #FAF6EE · 17px regular (Normal Text Rules)
WCAG AA Normal Text (>=4.5:1)
PASS
WCAG AA Large / UI (>=3.0:1)
PASS
WCAG AAA Normal Text (>=7.0:1)
PASS
WCAG AAA Large Text (>=4.5:1)
PASS
Foreground (#1C1814) Luminance 0.0095
Background (#FAF6EE) Luminance 0.9241
Non-Text Focus/Border SC 1.4.11 PASS (>=3.0:1)
Need scenario sensitivity analysis?
Pre-populated with your live calculator inputs & results.

Formula & Mathematical Methodology

Human eyes are far more sensitive to green and red light than blue light—Notice the ITU-R BT.709 luminance weights (`0.7152 Green`, `0.2126 Red`, `0.0722 Blue`). Because yellow and light amber contain high green channel values, their luminance is very close to white (`1.0`), making white text or light yellow focus rings on cream backgrounds fail contrast checks.

Contrast Ratio = (L_lighter + 0.05) / (L_darker + 0.05) | L = 0.2126·R + 0.7152·G + 0.0722·B
  • L — Relative luminance of a linearized sRGB color (0.0 for pure `#000000` black to 1.0 for pure `#FFFFFF` white).
  • 4.5 : 1 — WCAG 2.1 Level AA minimum contrast for normal body text (<24px regular or <18.66px bold).
  • 3.0 : 1 — WCAG 2.1 Level AA minimum for large text (>=24px or >=18.66px bold) and SC 1.4.11 non-text UI components/focus rings.
  • 7.0 : 1 — WCAG 2.1 Level AAA enhanced contrast standard for long-form editorial reading.

Step-by-Step Worked Example

Scenario: A designer checks ATIV's primary body ink `#1C1814` against the warm cream background `#FAF6EE` at 17px regular text, and compares it against white `#FFFFFF` on mid-amber `#B07B2E` at 14.5px bold.

  1. `#1C1814` luminance = 0.0097; `#FAF6EE` luminance = 0.9131 → Contrast = (0.9131 + 0.05) / (0.0097 + 0.05) = 16.13 : 1 (Passes AA & AAA).
  2. `#FFFFFF` (L = 1.0000) on `#B07B2E` (L = 0.2361) → Contrast = 1.05 / 0.2861 = 3.67 : 1 (FAILS 4.5:1 AA for 14.5px bold text).
  3. Darkening `#B07B2E` to `#7D5214` lowers background luminance to 0.1045, raising white-text contrast to 6.80 : 1 (Passes AA).

Key Takeaway: Testing badge and focus-ring colors against exact sRGB luminance equations prevents invisible keyboard focus states and low-contrast UI labels.

Practical Operator & Planning Tips

Frequently Asked Questions

What is the minimum contrast ratio required for WCAG 2.1 Level AA compliance?

Normal body text requires at least 4.5:1 contrast, large text (24px+ regular or 18.66px+ bold) requires at least 3.0:1, and interactive UI borders, icons, and focus indicators require at least 3.0:1.

Why does 14.5px bold text require 4.5:1 instead of the 3.0:1 large-text rule?

WCAG defines large bold text as 14 points (14pt), and in CSS 1pt = 1.333px (96/72), meaning bold text must be at least 18.66px (19px) to qualify for the 3.0:1 large-text threshold.

Do placeholder text and disabled buttons have to pass 4.5:1?

Disabled controls are exempt under WCAG 1.4.3, but visible form labels and default input values must pass 4.5:1 so users with low vision or bright-sunlight screens can read them.

Related Calculators

Continue modeling with connected tools in the ATIV suite.

All Text, SEO & Web Utilities Tools →
Text, SEO & Web Utilities · Technical SEO & CTR Audit

SEO Meta Tag & SERP Pixel Width Checker

Audit `<title>`, `<meta name="description">`, and canonical URLs against Google SERP character and pixel-width truncation thresholds.

Instant Calculator + AI Advisor Open Tool →
Text, SEO & Web Utilities · Information Security & NIST Math

Password Entropy & Crack-Time Calculator

Calculate cryptographic Shannon/pool entropy in bits, offline GPU cluster brute-force crack time, and generate high-entropy secrets in your browser via Web Crypto.

Instant Calculator + AI Advisor Open Tool →