Color Converter & Contrast Checker
WCAG 2.1Convert between HEX, RGB, and HSL color formats with real-time WCAG 2.1 AA/AAA contrast ratio compliance checking.
Sample Headline Text
Sample Headline Text
About This Tool
This tool converts a single color between HEX, RGB, and HSL notation and checks its WCAG 2.1 contrast ratio against pure white and pure black. Type a color code or drag the native picker, and all three formats plus both contrast cards update together: useful for picking a text color that will pass an accessibility audit against a given background.
It converts and checks one color at a time with exact mathematical luminance calculations.
Key Features
- Bidirectional color sync: The native color picker and text input stay continuously synchronized in both directions.
- Flexible format parser: Accepts HEX (3, 6, or 8-digit with alpha), rgb()/rgba(), and hsl()/hsla() strings.
- Simultaneous format output: HEX, RGB, and HSL are all displayed at once without requiring manual mode switching.
- Dual contrast cards: WCAG contrast ratios computed against both pure white and pure black backgrounds.
- AA/AAA compliance badges: Evaluates standard 4.5:1 (AA) and 7:1 (AAA) thresholds using relative luminance.
- Fully client-side: Color parsing, conversion, and contrast math never leave your browser.