Skip to content
SUMILORASUMILORA

Colour converter

Developer tools

Enter a colour in any notation. The others update immediately.

Runs in your browser

Nothing is uploaded. The work happens on your own device, so your file or text never reaches us.

About this tool

When to reach for HSL

HSL separates hue from saturation and lightness, which makes it the right space for editing rather than storing.

To make a colour darker in hex you have to recompute three channels and hope. In HSL you reduce the L. To build a palette of related colours, hold the hue and vary the other two — which is how the colour scale on this site was made.

For gradients and interpolation, HSL has its own flaw: it can pass through muddy or oversaturated intermediates. Newer spaces (OKLCH) fix that and are now well supported in browsers.

8-digit hex

#2f6f4e80 is the same colour with 50% alpha — the last pair is the alpha channel. 4-digit hex is the shorthand, so #fff8 is white at about 53%.

Both are supported everywhere now, and they are more compact than rgba().

Questions

How do I convert hex to RGB by hand?

Each pair is a hexadecimal byte: #2f6f4e is 2f = 47, 6f = 111, 4e = 78, so rgb(47, 111, 78).

What does the fourth hex pair mean?

Alpha, the opacity. #RRGGBBAA, where 00 is transparent and ff is opaque.

Related tools