Color Converter — HEX, RGB & HSL
About the HEX to RGB Color Converter
Enter a color in any format — #0d9488, rgb(13,148,136) or hsl(174,84%,32%) — and this tool converts it to the other two formats with a live swatch preview. The shorthand 3-digit HEX form (#abc) is expanded automatically.
HEX and RGB say what a color is; HSL says how it feels — rotating hue, saturating or lightening is far easier in HSL. Having all three side by side is the fastest way to translate a design into CSS.
How to use the HEX to RGB Color Converter
- Type or paste a color in HEX, RGB or HSL form.
- The other formats and a live preview update as you type.
- Click copy next to the format you need.
Conversion rules
HEX #RRGGBB → RGB: parse each byte as base 16 RGB → HSL: max/min normalization into hue (0–360°), saturation and lightness (0–100%) HSL → RGB: C = (1−|2L−1|)×S, then hue sector math back to R,G,B
Frequently asked questions
What is the difference between HEX and RGB?
Nothing functional — #0d9488 and rgb(13,148,136) are the same color written differently. CSS treats them identically.
When should I use HSL?
Whenever you derive colors programmatically: hover states (raise lightness), dark mode (lower lightness), accessible tints (adjust saturation). HSL makes those operations one number each.
Does it support alpha (RGBA / 8-digit HEX)?
It focuses on opaque colors; for transparency set the alpha in your CSS separately, e.g. hsl(..., / 0.5).
Related tools
Image Color Picker
Image Color Picker answers “what color is that?” instantly: load a photo, screenshot, logo or mock-up, click anywhere on it,…
Color Contrast Checker
Color Contrast Checker computes the WCAG contrast ratio between a text color and its background as you adjust either side.
JSON Formatter
Paste JSON and this tool tells you instantly whether it is valid — and if not, exactly where it breaks, with the error position.
UUID Generator
A UUID (universally unique identifier) is a 128-bit ID like 3f8a2c1e-9b4d-4e6a-8f2b-1c9d8e7f6a5b.