HEX to RGB to HSL Converter
Enter a color once, get HEX, RGB, and HSL side by side.
By opening this website or using its tools, you agree to our Terms and Privacy Policy.
Your file never leaves your browser during processing
How it works
To convert a color, type or pick it above in any notation (hex, rgb(), or hsl()) — the HEX, RGB, and HSL equivalents appear immediately, each with its own copy button, computed locally with no upload.
HEX, RGB, and HSL describe the exact same color space with different math. HEX and RGB both encode red, green, and blue channel intensities — HEX as a base-16 string, RGB as three base-10 numbers from 0–255 — so converting between them is a straightforward radix change. HSL (hue, saturation, lightness) is a different coordinate system built to match how people actually think about color: which hue on the wheel, how vivid, how light or dark — which is why design tools often expose HSL sliders even though browsers store the color as RGB underneath.
The conversion math is standard colorimetry: RGB to HSL runs through finding the channel min/max to derive lightness and saturation, then working out which channel is dominant to compute hue. It’s implemented directly in this page rather than pulled from a library, since the formulas are short and well-defined.
The input field accepts hex (#f97316 or the 3-digit shorthand #f60), rgb()/rgba(), and hsl()/hsla() — so you can paste a value from any of those formats and get the other two back immediately, or use the color picker swatch instead of typing.
FAQ
Which color formats can I paste in?
Hex (#f97316 or #f60), rgb()/rgba(), and hsl()/hsla(). Whichever you enter, the other two are computed and shown immediately.
Does this support alpha/transparency?
The alpha channel is accepted in rgba()/hsla() input but not carried through to the output — this tool converts solid color values, not transparency.
Is my color sent anywhere?
No. All parsing and conversion happens in plain JavaScript in your browser; nothing is uploaded.