AllKit

Color Converter — HEX, RGB & HSL

100% freeRuns in your browserNo sign-up

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

  1. Type or paste a color in HEX, RGB or HSL form.
  2. The other formats and a live preview update as you type.
  3. 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