How this tool computes its result
Implements the WCAG 2.x relative luminance formula directly: each hex color is split into R/G/B channels, linearized with the piecewise sRGB function (channel/12.92 below 0.03928, otherwise ((channel+0.055)/1.055)^2.4), then combined as 0.2126R + 0.7152G + 0.0722B. Contrast ratio is (L_lighter + 0.05) / (L_darker + 0.05). Hex input is normalized first — 3-digit shorthand is expanded to 6 digits, and anything not matching 6 hex characters (with or without a leading #) is rejected. The result is checked against four fixed WCAG thresholds: AA normal text 4.5:1, AA large text 3:1, AAA normal text 7:1, AAA large text 4.5:1.
