Color Converter

Convert between HEX, RGB, and HSL. Edit any field and the others update live.

Runs 100% in your browser. Nothing you paste here is ever sent to a server. Don't take our word for it — open your browser's DevTools (F12) → Network tab, use the tool, and watch: no new requests fire. Why that matters.

How this color converter works

Enter a color in HEX, RGB, or HSL, and it's converted to the other formats instantly using standard color-space math, all in your browser.

Why converted values sometimes look slightly off

HSL and RGB represent color fundamentally differently (cylindrical hue/saturation/lightness vs. additive red/green/blue channels), so converting between them involves floating-point math that gets rounded for display. Converting RGB → HSL → RGB can occasionally shift a value by 1 out of 255 due to rounding — this is expected and not a bug, and is invisible to the eye.

Alpha transparency and modern CSS syntax

Alpha (transparency) is appended differently across formats: #RRGGBBAA for 8-digit hex, rgba(r,g,b,a) for RGB, and modern CSS also supports space-separated syntax like rgb(255 0 0 / 50%). Older browsers may not support 8-digit hex or the newer space-separated syntax, so check your target browser support before relying on those forms in production CSS.

Frequently asked questions

Why do RGB and HSL give slightly different-looking values after round-tripping?

Floating-point rounding during the color-space conversion math. Differences are typically off by 1 in 255, which is not visually perceptible.

Does this support transparency/alpha values?

If the tool accepts 8-digit hex (#RRGGBBAA) or rgba() input, yes — check which formats are supported in the input field.

What's the difference between HSL and HSB/HSV?

Both describe color using hue plus two other dimensions, but HSL uses lightness (0% = black, 100% = white) while HSB/HSV uses brightness/value (0% = black, 100% = full color) — they are not interchangeable despite looking similar.

Other tools