What is color contrast?
Contrast ratio measures the difference in luminance between text (foreground) and its background on a scale from 1:1 (no contrast) to 21:1 (black on white).
This tool converts colors to sRGB, blends transparency before comparing colors, and uses the WCAG relative luminance formula.
WCAG thresholds
- AA: 4.5:1 for normal text, 3:1 for large text.
- AAA: 7:1 for normal text, 4.5:1 for large text.
- Large text is 18pt+ regular or 14pt+ bold.
- UI components, icons, and graphical objects should aim for at least 3:1.
Higher ratios improve readability, especially for thin fonts or small sizes.