Convert HEX, RGB, and HSL colors
This color converter turns any color into HEX, RGB, and HSL at once, with a live preview so you can see exactly what you are working with. Paste a value in any of the three formats, or use the color picker, and copy whichever format you need. It covers the conversions front-end developers do all day: hex to RGB, RGB to hex, and HSL in both directions.
Which format should you use?
- HEX (like #5869da) is the most common in CSS and design tools.
- RGB (like rgb(88, 105, 218)) is handy when you need the raw red, green, and blue channels, or want transparency with rgba.
- HSL (like hsl(230, 64%, 60%)) describes hue, saturation, and lightness, which makes it easy to tweak a color by feel: nudge the lightness up for a tint, down for a shade.
Frequently asked questions
How do I convert HEX to RGB?
Paste your hex value (for example #5869da) into the box, and the RGB result appears instantly, ready to copy.
How do I convert RGB to HEX?
Type or paste an RGB value like rgb(88, 105, 218) and the tool shows the matching HEX code, along with HSL.
What formats does it accept?
Hex (3 or 6 digits, with or without #), rgb() or plain comma-separated RGB, and hsl(). You can also click the swatch to pick a color visually.
Is the conversion done in my browser?
Yes. Everything runs locally in your browser, so nothing you enter is sent anywhere.