Check if your color combinations meet WCAG accessibility standards
WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios between text and background colors. Normal text needs at least 4.5:1 (AA) or 7:1 (AAA). Large text (18px+ bold or 24px+ regular) needs 3:1 (AA) or 4.5:1 (AAA).
A good contrast ratio is at least 4.5:1 for normal text (WCAG AA). For enhanced accessibility (WCAG AAA), aim for 7:1 or higher. The maximum possible contrast ratio is 21:1 (pure black on pure white).
Enter the foreground (text) color and background color in HEX format. The tool calculates the relative luminance of each color using the WCAG formula and divides them to get the contrast ratio. It then reports whether the combination passes AA and AAA standards for normal and large text.
Use dark text on light backgrounds (e.g., #0f172a on #ffffff gives ~15:1) or light text on dark backgrounds. Avoid low-contrast combinations like gray on white (#999 on #fff is only 2.7:1). Tools like this contrast checker help you verify before publishing.