Color Converter (HEX, RGB, HSL)
Convert any CSS color between HEX, RGB, and HSL with a live preview.
100% in your browser — nothing uploadedConvert HEX to RGB and HSL
About this color converter
Type or paste a color in any common CSS format — 3-, 4-, 6-, or 8-digit hex, rgb() / rgba(), hsl() / hsla(), or a named color like tomato — and every equivalent appears instantly: HEX, RGB, and HSL, plus rgba(), hsla(), and 8-digit hex whenever the color has transparency. A large preview swatch and a native color picker stay in sync with whatever you enter, so you can also start from the picker and copy the code you need.
It’s built for the everyday reality of front-end work: a designer hands you an rgba() value, your stylesheet uses hex, and your design tokens want HSL so you can tweak lightness without shifting the hue. The conversion math runs locally in your browser with exact RGB-to-HSL formulas in both directions — no server round trip, nothing logged, no account. Once the page loads, it even works offline.
FAQ
How do I convert HEX to RGB?
A hex color is just red, green, and blue written in base 16: #0b7a55 means red 0b (11), green 7a (122), and blue 55 (85), so it equals rgb(11, 122, 85). Paste either form above and the tool converts both ways instantly.
Does it support transparency (alpha)?
Yes. It accepts 4- and 8-digit hex like #0b7a5580, rgba(), hsla(), and the modern slash syntax like rgb(11 122 85 / 50%). When alpha is below 1, the tool also shows rgba(), hsla(), and 8-digit hex outputs.
Which color formats can I type in?
Hex (3, 4, 6, or 8 digits), rgb()/rgba() and hsl()/hsla() in both the legacy comma and modern space syntax, plus all CSS named colors like rebeccapurple. Newer color spaces such as lab(), oklch(), and display-p3 aren’t supported — the tool focuses on the classic sRGB formats.