Contrast ratio and web accessibility (WCAG)

The brightness difference between text and background is called the contrast ratio, expressed from 1:1 (identical) up to 21:1 (black on white).

The Web Content Accessibility Guidelines (WCAG) recommend a minimum contrast of 4.5:1 for normal text and 3:1 for large text. Low contrast makes text hard to read for low-vision users or in bright sunlight.

When choosing colors, check not only whether they look nice but whether they read well over the background. The contrast preview on each color detail page shows legibility for light and dark text.