Contrast and WCAG
Understand contrast ratios, text thresholds, and how Huebook checks them.
Huebook reports WCAG 2.x contrast. It converts sRGB channels to linear light, calculates each color’s relative luminance, then divides the lighter luminance plus 0.05 by the darker luminance plus 0.05. The ratio runs from 1:1 (no contrast) to 21:1 (maximum contrast). Color order does not change the result.
For text, WCAG AA calls for 4.5:1 for normal text and 3:1 for large text. AAA calls for 7:1 for normal text and 4.5:1 for large text. Large text means at least 18 point regular or 14 point bold. Huebook’s color detail compares a color with white and black. Generate reports the minimum among palette color pairs and checks its darkest-to-lightest colors against the optional 4.5:1 generation target. Color Scope on Mac uses text recognized in the captured screen area, estimates foreground and background colors, and reports the detected pairs; its simulation can show how color-vision differences affect those ratios.
A passing ratio is a useful check, not a guarantee that text is readable in every design. Actual size, weight, font, background imagery, and surrounding content matter. These ratios compare the color values without blending transparency into a background. If your design uses opacity or images, check the final rendered foreground and background colors as well.
Need a hand?
Tell us what you were doing, your device, and your Huebook version.
Huebook