Using Color Contrast Checker
Black on white is the upper reference pair at 21:1. The ratio compares relative luminance. Use the appropriate text-size threshold and check hover, focus and error states separately. A passing color pair covers only one part of accessible design.
Example input
- Foreground HEX
#000000
- Background HEX
#ffffff
Example result
Contrast ratio: 21.00:1 AA normal text (4.5:1): Pass AA large text (3:1): Pass AAA normal text (7:1): Pass Contrast alone is not a complete accessibility audit.
Read next · How to Choose the Right Online Tool
Test the rendered state
Measure text against its actual adjacent background. Hover states, transparent overlays and background images can change the effective colors. A ratio from two solid swatches cannot describe every pixel of a photograph. Also inspect size, weight, focus indicators and error text, since contrast is one part of a usable interface.
Input reference
- Foreground HEX
- Enter text. Field hint — #3366cc.
- Background HEX
- Enter text. Field hint — #ffffff or 0.5.
Continue your task
- CSS Gradient Generator — Generate an angled gradient from a starting color to orange.
- Color Converter — Convert HEX and RGB color values and preview them.
- HEX to RGB Converter — Convert HEX colors to RGB.