Accepted colors
Accepted inputs become eight-bit opaque sRGB values. You can enter three- or six-digit HEX, integer rgb(r,g,b), hsl(h,s%,l%) or a standard CSS name. HSL is converted to the final hex value before the other views are calculated. Alpha, transparent, currentColor, CSS variables, gradients, wide-gamut color() and Lab are not supported.
Relative luminance
For each eight-bit channel, divide by 255. Values at or below 0.04045 are divided by 12.92; higher values use ((c + 0.055) / 1.055) raised to 2.4. Luminance is 0.2126 × R + 0.7152 × G + 0.0722 × B. Contrast is (lighter luminance + 0.05) / (darker luminance + 0.05).
Text contrast thresholds
AA normal text requires at least 4.5:1 and AA large text at least 3:1. AAA normal text requires at least 7:1 and AAA large text at least 4.5:1. Large text means at least 18 pt regular or 14 pt bold, equivalent to 24 CSS px regular or 18⅔ CSS px at weight 700 or above in this interface. A displayed value is rounded only for reading; comparison always uses the full-precision result.
Why rounding matters
#777777 on #FFFFFF has a ratio of 4.478089453577214:1, displayed as 4.48:1. It fails AA normal, passes AA large and fails both AAA categories. Even if a ratio below 4.5 rounds to 4.50, it still fails the 4.5:1 threshold.
Related hues, tints and shades
Complementary and analogous colors rotate HSL hue by 180 degrees and ±30 degrees. Tints and shades mix the gamma-encoded sRGB channels toward white or black at 0, 25, 50, 75 and 100 percent, then round to eight-bit values. These steps are repeatable but not perceptually uniform.
What the results cover
The text thresholds come from WCAG 2.2 SC 1.4.3 and SC 1.4.6. Passing one pair does not establish full WCAG conformance. Fonts, antialiasing, displays, transparency and viewing conditions can affect appearance, so review the actual interface and its states too.