Color Converter (HEX, RGB, HSL)

Convert colours between HEX, RGB and HSL with a live preview.

HEX#4f46e5
RGBrgb(79, 70, 229)
HSLhsl(243, 75%, 59%)

About the Color Converter (HEX, RGB, HSL)

Designers and front-end developers juggle colour formats constantly — a HEX code from a style guide, RGB values from a screenshot, HSL for tweaking lightness in CSS. The AlarmDaddy Color Converter turns any colour into all three formats at once, with a live swatch so you can see exactly what you've got.

Pick a colour with the swatch picker or type a HEX code, and copy the HEX, RGB or HSL value with one click. It all runs in your browser.

How to use this calculator

  1. 1Pick a colour with the swatch, or type a HEX code.
  2. 2Read the HEX, RGB and HSL values.
  3. 3Copy whichever format you need.

The formula

HEX → RGB reads byte pairs; RGB → HSL maps the colour to hue, saturation and lightness.

A HEX colour encodes red, green and blue as three pairs of hexadecimal digits (00–FF). RGB to HSL finds the max and min channels to derive lightness, then saturation, then the hue angle (0–360°). The conversions are exact and reversible.

Frequently asked questions

RGB describes a colour by its red, green and blue light components. HSL describes the same colour by hue (the colour), saturation (its intensity) and lightness — which is often more intuitive when adjusting colours.