Contrast ratio measures the brightness difference between two colors, with a value ranging from 1:1 (no contrast) to 21:1 (maximum contrast). The contrast ratio is calculated based on the relative luminance of the foreground and background colors. For accessibility, WCAG recommends a ratio of at least 4.5:1 for normal text and 3:1 for large text. For optimal accessibility, higher contrast ratios (such as 7:1) are recommended.
Glossary Term