Color Converter
Convert between HEX, RGB, HSL and HSV with a live swatch.
Loading tool…
About this tool
Converts between hex, rgb(), hsl() and HSV, and reports WCAG contrast against white and black. HSL is usually the easiest space to reason in when building a palette, since lightening a colour means changing one number rather than three.
Questions
- What do the AA and AAA labels mean?
- WCAG contrast thresholds: 4.5:1 is the minimum for normal body text, 3:1 for large text and interface components, and 7:1 meets the stricter AAA level.
- My colour passes but still looks hard to read.
- The WCAG 2 formula is known to be imperfect, particularly for light text on dark backgrounds. Treat the ratio as a floor to clear rather than a guarantee, and trust the preview.
- What is the eight-digit hex?
- Hex with an alpha channel — the last two digits are opacity, from 00 for transparent to ff for opaque.
Privacy
This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.