HSL to Hex Converter

Set the hue angle, saturation and lightness — the hex code and RGB values update as you drag.

#7c3bed
Hex
#7c3bed
RGB
rgb(124, 59, 237)
HSL
hsl(262, 83%, 58%)
CSS
color: #7c3bed;

Hex codes are how CSS stores colors; HSL is how designers think about them. Setting the hue angle fixes the color family, saturation decides how vivid it is, and lightness moves it from black through the pure color to white. This converter turns any hsl() triple into the hex value a stylesheet expects, so a color you tuned visually can be pasted straight into code.

Frequently asked questions

Convert the HSL triple to RGB first — the hue selects which channels rise and fall while saturation and lightness scale them — then write each channel as two hex digits. hsl(262, 83%, 58%) becomes rgb(124, 58, 237), which is #7C3AED.

Good to know

  • Pure red, green and blue sit at 0°, 120° and 240°.
  • Saturation 0% gives grey at any hue — the fastest way to build a neutral ramp.
  • Lightness above 50% tints a color; below 50% shades it.

Tools that pair with HSL to Hex Converter

HSL to Hex Converter is one of 33 single-page tools in this workspace. These are the ones that carry the job on — the color value moves between them, so nothing gets retyped or re-uploaded.