Hex to RGB
Convert colors between hex, rgb(), and hsl() with linked live inputs — paste any format, including CSS color names, and get all the others.
Processed locally in your browser — nothing is uploaded.
Hex to RGB
CSS named color
About Hex to RGB
Paste a color in any common notation — #f60, #ff6600, #rrggbbaa, rgb(255 102 0), hsl(24, 100%, 50%), or a CSS name like tomato — and the other formats update instantly. Edit whichever field you like; the rest stay in sync.
If the color exactly matches one of the 148 CSS named colors, the name is shown too, so you can write `rebeccapurple` instead of a hex code when it reads better.
Common uses
- Translate a designer's hex code into rgb() for an rgba() overlay
- Convert rgb() values from a screenshot tool into hex for CSS
- Check whether a hex code has a memorable CSS name
Example
Input
#ff6347
Output
rgb(255, 99, 71) · hsl(9, 100%, 64%) · CSS name: tomato
Frequently asked questions
What do the six digits in a hex color code mean?
They are three pairs of hexadecimal (base-16) numbers for red, green, and blue, each running 00 to FF — that is 0 to 255 in decimal. #ff6600 means red 255, green 102, blue 0.
Are the colors I convert uploaded or stored anywhere?
No. Conversion between hex, RGB, and HSL is pure arithmetic done in your browser; nothing you paste is sent over the network or saved.
What is an 8-digit hex code like #rrggbbaa?
The extra fourth pair is the alpha channel — opacity from 00 (fully transparent) to FF (fully opaque). #ff660080 is orange at roughly 50% opacity, and this converter accepts the 4- and 8-digit alpha forms as well.
Can I convert a CSS color name like tomato into hex?
Yes. Type any of the CSS named colors and you get its hex, RGB, and HSL equivalents; going the other way, the tool tells you when a code you paste exactly matches one of the 148 names, like #663399 being rebeccapurple.
When should I use HSL instead of RGB?
Use HSL when you want to reason about a color: hue is the position on the color wheel in degrees, and saturation and lightness are percentages, so making a color lighter or less vivid means changing one number. RGB and hex describe the same colors but are harder to adjust by eye.