← All free tools Misc tools

HEX to HSLA

Convert your HEX color format to HSLA format.

Accepts any format: #a8d08d, rgb(168 208 141), hsl(96, 42%, 68%), hsv(96, 32%, 82%) or a color name.

About this tool

Type or paste a HEX color, or choose one with the picker, and the converter shows it as HSLA 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 HEX to HSLA

A HEX code is three pairs of base-16 digits: in #a8d08d, a8 is 168 red, d0 is 208 green and 8d is 141 blue. For HSLA, work out HSL: divide each channel by 255 and take the largest and smallest. The lightness is their average, the saturation the gap between them relative to the lightness, and the hue an angle set by the largest channel. Then add the alpha from 0 to 1.

A HEX color is always solid, so its alpha comes out as 1.

The hue, saturation and lightness are rounded to whole numbers, so converting back can move a channel by one.

HEX to HSLA examples

ColorHEXHSLA
Sage green #a8d08d hsla(96, 42%, 68%, 1)
Red #ff0000 hsla(0, 100%, 50%, 1)
Tomato #ff6347 hsla(9, 100%, 64%, 1)
Gold #ffd700 hsla(51, 100%, 50%, 1)
Dodger blue #1e90ff hsla(210, 100%, 56%, 1)
Indigo #4b0082 hsla(275, 100%, 25%, 1)
Black #000000 hsla(0, 0%, 0%, 1)
White #ffffff hsla(0, 0%, 100%, 1)

What is HEX?

A HEX code is the most common way to write a color for the web and in design apps: a # followed by three pairs of base-16 digits, from 00 to ff, for red, green and blue. A three-digit code like #fc0 is short for #ffcc00.

What is HSLA?

HSLA is HSL with alpha, the opacity, added as a number from 0 (invisible) to 1 (solid).

Have a project in mind?

Have a brand or a product to grow?