Noindex support page · W3C source checked 2026-10-01

Method and sources

This worksheet implements the WCAG 2.2 relative-luminance and contrast-ratio arithmetic for opaque six-digit sRGB colors. Its explanations are informative; the linked WCAG Recommendation is normative.

Arithmetic

  1. Convert each 8-bit channel to encoded sRGB by dividing by 255.
  2. Linearize each channel: when the encoded value is at most 0.04045, divide by 12.92; otherwise use ((value + 0.055) / 1.055) ^ 2.4.
  3. Compute relative luminance: L = 0.2126R + 0.7152G + 0.0722B.
  4. Compute contrast: (lighter L + 0.05) / (darker L + 0.05).

Threshold decisions use the unrounded result. Displayed ratios are rounded only after the pass/fail comparison.

Role thresholds implemented

Declared roleAAAAASource criterion
Regular text4.5:17:1SC 1.4.3 / SC 1.4.6
Large text3:14.5:1SC 1.4.3 / SC 1.4.6
Required UI/state/graphical information3:1Not evaluatedSC 1.4.11
Surface or decorativeNo threshold by itselfNo threshold by itselfMay still be the adjacent color for another role

Primary sources

NOT_A_FULL_ACCESSIBILITY_AUDITThe worksheet does not inspect markup, rendered context, states, exceptions, font metrics, anti-aliasing, or any other WCAG success criterion.