How this tool works
Contrast ratio uses relative luminance: (lighter + 0.05) / (darker + 0.05). Aim for at least 4.5:1 for normal body text.
Check contrast ratio between two hex colors using the WCAG relative luminance formula.
Contrast ratio uses relative luminance: (lighter + 0.05) / (darker + 0.05). Aim for at least 4.5:1 for normal body text.
The calculator compares foreground and background color contrast using relative luminance.
Use it before publishing text over a colored button, banner or image background.
A color pair that looks stylish may still be hard to read for users with low vision or in bright light.