Color Converter
Last updated: 2026-06-25
The color converter is a free tool that converts HEX, RGB and HSL color codes both ways with a real-time preview.
It gives you code you can paste straight into CSS, and every conversion runs in your browser.
Color code input
How to use
- Enter a color — enter a value in one format: HEX (#RRGGBB), RGB (r,g,b) or HSL (h,s%,l%), or use the color picker.
- Run conversion — click the convert button for that format and the other formats fill in automatically.
- Preview and copy — check the result with the color preview and select the value you want to copy.
Understanding color notations
On the web and in design, the same color is written in several ways. Knowing which format fits a situation speeds up your work.
| Format | Notation | Strength |
|---|---|---|
| HEX | #FF0000 | Most concise, common in CSS and design tools |
| RGB | rgb(255, 0, 0) | Intuitive channel values, rgba adds alpha |
| HSL | hsl(0, 100%, 50%) | Great for adjusting hue and brightness |
HEX and RGB differ only by base: each channel is written in hexadecimal (00–FF) or decimal (0–255). If you are curious about hex conversion itself, use the base converter; to manage color codes in JSON, use the JSON formatter.
Frequently asked questions (FAQ)
What is the difference between HEX and RGB?
They are the same color written differently. HEX uses hexadecimal like #RRGGBB, while RGB uses decimal 0–255 like rgb(255,0,0) for the red, green and blue channels. For example #FF0000 and rgb(255,0,0) are the same red.
What color model is HSL?
HSL describes color with Hue (0–360°), Saturation (0–100%) and Lightness (0–100%). It makes it easy to keep the hue while adjusting brightness or saturation, which is intuitive for design work.
Are 3-digit HEX codes supported?
Yes. A 3-digit shorthand HEX like #abc is expanded to #aabbcc before conversion. The # sign is optional.
Does the conversion happen on a server?
No. All color conversions are computed in the browser with JavaScript, and your input is never sent to a server.
Related tools & guides
Last updated: 2026-06-25