Color Converter

Convert colors between HEX, RGB, and HSL. Pick any color and get all formats.

HEX#3b82f6
RGBrgb(59, 130, 246)
HSLhsl(217, 91%, 60%)

Color Swatches

About Color Converter

HEX, RGB, and HSL describe the same colours in different ways. HEX is compact and common in CSS, RGB maps directly to how screens emit light, and HSL separates hue from saturation and lightness, which makes it far easier to build a consistent palette by hand.

How to use

  1. Pick a colour or enter a value in any supported format.
  2. Read the equivalent HEX, RGB, and HSL values.
  3. Copy the format your stylesheet needs.

Frequently asked questions

What do the numbers in HSL mean?

Hue is an angle from 0 to 360 on the colour wheel, where 0 is red, 120 is green, and 240 is blue. Saturation is intensity from 0% grey to 100% vivid. Lightness runs from 0% black through 50% pure colour to 100% white.

Why do designers prefer HSL?

Adjusting one value changes one perceptual property. Building a tint or shade means changing only the lightness, whereas the same change in HEX or RGB requires recalculating all three channels.

What is the alpha channel?

Alpha sets opacity from 0 fully transparent to 1 fully opaque. It appears as a fourth value in rgba() and hsla(), or as two extra digits on an 8-digit HEX code.