Color Converter
Convert colors between HEX, RGB, and HSL.
Your color appears here
Enter a valid HEX, RGB, or HSL color to see the swatch.
Convert colors between HEX, RGB, and HSL
ColorConverter turns a single color between the three formats CSS uses most: HEX like #3b82f6, RGB like rgb(59, 130, 246), and HSL like hsl(217, 91%, 60%). Type a value in any field — or use the color picker — and the other formats update instantly alongside a large live swatch. Each format has a copy button so you can paste it straight into your stylesheet. Everything is computed in your browser; nothing is uploaded.
Common questions
What color formats can I convert between?
HEX (#RRGGBB or the shorthand #RGB), RGB (rgb(r, g, b) or bare r, g, b), and HSL (hsl(h, s%, l%)). Edit any one and the other two update live.
Does it support alpha or transparency?
This tool converts opaque colors between HEX, RGB, and HSL. Alpha channels (RGBA / HSLA / 8-digit HEX) are not part of the conversion.
Why does my HSL value shift by one when I round-trip it?
RGB and HSL do not map one-to-one — converting to HSL and back can land on a neighbouring integer because each channel is rounded. The visible color is effectively identical.
How do the copy buttons work?
Each format has a Copy button that writes that exact string to your clipboard using the browser's Clipboard API, so you can paste it directly into CSS.
Is my data sent anywhere?
No. The conversion is pure math running in your browser tab. No color, and nothing else, is uploaded to a server.