Contrast ratio.
Reads this page's text and background via getComputedStyle and computes the WCAG contrast ratio. AA needs 4.5:1 for text, AAA needs 7:1.
The reading is for body text vs body background as currently rendered. For per-block audits, paste your colours into a dedicated contrast checker.
We read getComputedStyle(document.body).color and .backgroundColor, parse the RGB triple, and compute relative luminance per the sRGB formula (gamma-correct, weighted by human eye sensitivity).
The contrast ratio is (L1 + 0.05) / (L2 + 0.05). WCAG thresholds: 3:1 for large text (18pt+), 4.5:1 for normal text (AA), 7:1 for normal text (AAA).