Check the contrast ratio between two colors against WCAG AA and AAA accessibility standards.
Contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L1 and L2 are the relative luminance of the lighter and darker colors. WCAG AA requires 4.5:1 for normal text and 3:1 for large text (18pt+, or bold 14pt+); AAA requires 7:1 and 4.5:1 respectively.
WCAG AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt+, or 14pt+ bold).
WCAG AAA, the stricter standard, requires at least 7:1 for normal text and 4.5:1 for large text.
Contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color.