Skip to content
ColorArchive
Issue 101
2027-11-18

Type on color: the specific rules that make text readable across backgrounds

WCAG contrast ratios give a minimum floor, not a ceiling, for type legibility. A technically passing 4.5:1 ratio can still produce uncomfortable reading if the hue relationship between type and background creates optical vibration. A failing ratio might be acceptable for large display type in certain design contexts. Understanding the mechanics behind contrast requirements — and the exceptions — leads to better typographic decisions than following ratios mechanically.

Highlights
WCAG contrast ratio is calculated using relative luminance — a weighted sum of linearized RGB channels that models human vision's sensitivity to different wavelengths (green contributes most to perceived brightness, blue the least). The formula was designed around standard monitor calibration and sRGB color space. It does not account for hue-based optical effects: two pairs of colors with identical contrast ratios can have very different legibility depending on whether they share a hue component. Color pairs that share a hue (a dark blue on a light blue background) at 4.5:1 are harder to read than neutral-on-neutral pairs at the same ratio.
Research in ophthalmology shows that chromatic aberration — the eye's inability to focus different wavelengths at the same focal plane — makes pure red text on pure blue backgrounds (or vice versa) physically uncomfortable to read for extended periods regardless of luminance contrast. The crystalline lens in the eye cannot simultaneously focus short-wavelength (blue) and long-wavelength (red) light, so the eye is constantly micro-adjusting focus when both hues are present at high saturation. High-saturation complementary color pairings should therefore be avoided for body text even when luminance contrast passes WCAG.
The third factor beyond contrast ratio and hue relationship is text size relative to weight. WCAG distinguishes large text (18pt regular, 14pt bold) from small text, requiring only 3:1 for large. But this binary threshold misses the actual variable: the total ink area of the letterform. A bold condensed face at 14pt may have more ink area than a light extended face at 18pt. Designers applying WCAG ratios mechanically to these edge cases are not actually optimizing legibility — they are satisfying a proxy metric. The practical rule: err toward higher contrast for any text that is not large and heavy, regardless of whether the technical threshold is satisfied.

How the WCAG contrast formula works

The WCAG contrast formula computes relative luminance for two colors, then calculates the ratio between the lighter and darker values. Relative luminance uses the standard sRGB luminance coefficients: R×0.2126 + G×0.7152 + B×0.0722 (after gamma correction). This formula gives a single number that ranges from 0 (black) to 1 (white). The contrast ratio is then (L1 + 0.05) / (L2 + 0.05). Understanding this formula explains several practical points: First, neutral colors (greys with equal R, G, B values) have predictable luminance values that are easy to reason about. Second, saturated colors of the same lightness value in HSL do not have the same luminance — a pure red (H:0, S:100%, L:50%) is darker in perceived luminance than a pure yellow (H:60, S:100%, L:50%) because the luminance formula weights green very heavily. This is why bright yellow text fails contrast checks against white even though it looks similar in HSL lightness. Designers working with saturated colors should always verify contrast with an actual calculation tool rather than estimating from HSL values.

Hue relationships and text comfort

Beyond the raw luminance ratio, hue relationships affect reading comfort in ways that WCAG does not capture. The clearest example is chromatic vibration: when two colors of similar luminance but different saturated hues are placed adjacent, the eye perceives an apparent flickering or vibration at the boundary. This occurs most strongly with complementary color pairs (red/green, blue/orange, yellow/violet) at high saturation. For text on color, this means that a bright red headline on a green background — even if the contrast ratio technically passes — will be uncomfortable to read because of chromatic edge contrast effects. The practical solution: desaturate one of the two colors to reduce the chromatic energy at the edge. A muted, desaturated green background with a saturated red headline creates sufficient luminance contrast without the full chromatic vibration of pure hues on both sides. This is why print typographers historically avoided chromatic complementary pairings for body text while using them freely for display applications where the viewer's eye is not tracing character forms for extended periods.

Dark mode and text contrast considerations

Dark mode text legibility has specific requirements that differ from light mode. In light mode, dark text on a light background is the dominant contrast direction, and the eye's photopic (daytime) vision system is optimized for it. In dark mode, light text on a dark background requires mesopic vision processing, which is less sharp for fine detail. This means that identical contrast ratios are not equivalent in light and dark contexts: a 4.5:1 light-text-on-dark-background may require larger type sizes or heavier weights to achieve the same practical legibility as 4.5:1 dark-text-on-light-background. Additionally, pure white (#FFFFFF) text on pure black (#000000) — which produces maximum contrast — is actually harder to read in dark mode for extended periods than slightly desaturated white on very dark grey, because the extreme contrast causes 'halation' — a visual bloom around the white letterforms that reduces sharpness. Dark mode body text is typically best at #E0E0E0 to #F0F0F0 on #1A1A1A to #121212, not at pure white on pure black.

Practical guidelines for text on color

A working set of rules for text on color backgrounds: (1) Always verify with a contrast calculator — do not estimate from HSL lightness values, which are unreliable for saturated colors. (2) For body text, target 7:1 rather than the 4.5:1 minimum — the extra margin costs nothing and protects legibility in varied ambient light conditions. (3) Avoid chromatic complementary pairs at full saturation for body text — desaturate the background if needed. (4) Test with actual typefaces at the intended size and weight, not with theoretical color swatches — the perceived contrast of set text differs from isolated color patches. (5) In dark mode, avoid pure white body text — use #EFEFEF or similar near-white instead. (6) Large display type above 32pt can accept lower contrast ratios than WCAG minimums because letter recognition does not depend on fine detail at large sizes — this is the context where bold creative color choices are safest. Apply WCAG minimums to body text, UI labels, and captions; be more flexible for display headlines that are purely decorative or navigational.

Newer issue
Designing for global audiences: what color associations actually vary across cultures
2027-11-11
Older issue
Color in healthcare and medical interfaces: trust, urgency, and clarity
2027-12-03