HSL to HEXA
Convert your HSL color format to HEXA format.
About this tool
Type or paste an HSL color, or choose one with the picker, and the converter shows it as HEXA as you type, with a preview and every other format underneath, each with its own copy button. It reads colors written in any of the formats, and color names like “tomato”, too.
How to convert HSL to HEXA
To turn HSL into red, green and blue, the hue picks a point on the color wheel, the saturation sets how far the color is from gray, and the lightness moves it between black and white. To write a HEXA code, turn each channel into two base-16 digits, then add alpha × 255 the same way: 168, 208 and 141 are a8, d0 and 8d, and 0.8 × 255 = 204 is cc, which makes #a8d08dcc.
An HSL color is always solid, so its alpha comes out as ff.
HSL to HEXA examples
| Color | HSL | HEXA |
|---|---|---|
| Sage green | hsl(96, 42%, 68%) |
#a8d08dff |
| Red | hsl(0, 100%, 50%) |
#ff0000ff |
| Tomato | hsl(9, 100%, 64%) |
#ff6347ff |
| Gold | hsl(51, 100%, 50%) |
#ffd700ff |
| Dodger blue | hsl(210, 100%, 56%) |
#1e90ffff |
| Indigo | hsl(275, 100%, 25%) |
#4b0082ff |
| Black | hsl(0, 0%, 0%) |
#000000ff |
| White | hsl(0, 0%, 100%) |
#ffffffff |
What is HSL?
HSL describes a color by its hue (0 to 360 degrees on the color wheel), saturation and lightness. It’s easy to adjust by hand: keep the hue and change the lightness to get lighter and darker shades of the same color. CSS accepts it directly.
What is HEXA?
HEXA adds a fourth pair of digits to a HEX code for alpha, the opacity: ff is solid, 80 about half see-through and 00 invisible. All current browsers accept eight-digit codes in CSS.