Color Converter
Convert a color between the three formats you actually use in CSS — HEX, RGB, and HSL. Paste a value in any format, or pick one with the color picker, and get the other two instantly, with a live swatch and copy buttons for each.
- Free — no sign-up
- Private — runs in your browser
- Instant results
HEX
#4f46e5RGB
rgb(79, 70, 229)HSL
hsl(243, 75%, 59%)How to use the Color Converter
- 1Enter a color. Type a HEX code, rgb(), or hsl() value — or pick a color visually.
- 2Read every format. See the equivalent HEX, RGB, and HSL values update as you go.
- 3Copy what you need. Use the copy button next to any format to grab it for your CSS.
Frequently asked questions
What's the difference between HEX, RGB, and HSL?
All three describe the same colors. HEX and RGB specify red, green, and blue amounts, while HSL uses hue, saturation, and lightness — which is often easier to tweak by hand.
How do I convert HEX to RGB?
Split the six-digit hex into three pairs and convert each from base-16 to a 0–255 number. For example, #4f46e5 becomes rgb(79, 70, 229). This tool does it instantly.