How to Use
Enter two colors:
- Foreground: Text/icon color
- Background: Background color
- View the contrast ratio and WCAG compliance
WCAG Compliance Levels
- AA Normal: 4.5:1 ratio minimum
- AA Large: 3:1 ratio minimum (18pt+ or 14pt bold)
- AAA Normal: 7:1 ratio minimum
- AAA Large: 4.5:1 ratio minimum
Contrast Ratio Formula
Contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter relative luminance and L2 is the darker. Relative luminance uses linearized sRGB values weighted by human perception.
Step-by-Step Instructions
- 1Enter the foreground (text) color.
- 2Enter the background color.
- 3View the contrast ratio.
- 4Check AA and AAA compliance.
- 5Adjust colors if needed.