Hex to HSL Converter

Paste a hex color code to get its hue, saturation, and lightness as a ready-to-use CSS hsl() value. The conversion happens instantly as you type, and one click copies the whole string. Going the other way? Use the HSL to hex converter.

Hex → HSL

hsl(153, 40%, 30%)

Have HSL values and need the hex code? Use the HSL to hex converter.

Working with #2D6A4F or any other color? The color library lists its HSL, RGB, tints, shades, and WCAG contrast notes on one page — and the generator builds full ramps from any hex code.

Reading an HSL Value

hsl(153, 40%, 30%) reads as: a hue of 153° on the color wheel (0° is red, 120° green, 240° blue — 153° is green leaning toward teal), saturation of 40% (moderately muted; 0% would be gray, 100% fully vivid), and lightness of 30% (fairly dark; 0% is black, 50% the pure color, 100% white). Together that's the dark forest green you see in the swatch above.

Why Convert Hex to HSL?

Hex codes are opaque — you can't tell from #2d6a4f how to make it lighter or more muted. In HSL those moves become single-number edits: raise lightness a few points for a hover state (the lighten color tool does this for you), lower it for an active state, or hold hue steady and step lightness to build a whole ramp with the tint and shade generator.

Modern CSS can even do the tweak inline with relative color syntax — no conversion tool needed once you understand what the channels mean:

/* Same color, restated through its own channels */
background: hsl(from #2d6a4f h s l);

/* A hover state 15 lightness points lighter */
background: hsl(from #2d6a4f h s calc(l + 15));   /* ≈ #45a177 */

Example Hex → HSL Values

ColorHexHSL
Red#FF0000hsl(0, 100%, 50%)
Green#008000hsl(120, 100%, 25%)
Blue#0000FFhsl(240, 100%, 50%)
Orange#FFA500hsl(39, 100%, 50%)
Sky blue#3498DBhsl(204, 70%, 53%)
Forest green#2D6A4Fhsl(153, 40%, 30%)

Need the raw channel numbers instead? The hex to RGB converter gives you rgb() values, and RGB to hex goes back the other way. Or explore hue, saturation, and lightness interactively with the color picker.

Frequently Asked Questions

Related tools: HSL to hex · hex to RGB · RGB to hex · color picker · tint & shade generator

Got your hsl() value? Put it to work on a page that's yours — create your free MinglyLink page →