W3C Color Space & WCAG 2.1 Contrast Metrics
Accurate sRGB relative luminance calculation conforming strictly to W3C Web Content Accessibility Guidelines (WCAG) 2.1.
Relative luminance is calculated by linearizing gamma-corrected sRGB channels: `(0.2126*R + 0.7152*G + 0.0722*B)` where channels are adjusted for human ocular cone sensitivity.
Ratio equals `(L1 + 0.05) / (L2 + 0.05)` where L1 is the lighter color and L2 is the darker color, spanning from 1:1 (zero contrast) up to 21:1 (pure black on pure white).
OKLCH provides perceptually uniform lightness (L) and chroma (C) across hues (H), eliminating sudden perceived brightness drops common in HSL.
FREQUENTLY ASKED QUESTIONS
Q: What is the difference between AA and AAA requirements?
WCAG Level AA requires at least 4.5:1 for regular text and 3:1 for large text (≥18pt or bold ≥14pt). Level AAA demands 7:1 for normal and 4.5:1 for large text.
Q: Does this tool support Alpha channel transparency?
Yes. Hex codes with alpha (`#rrggbbaa`) and rgba/hsla strings are automatically flattened against dark backing for accessibility verification.