HEX to HSL

Convert an opaque HEX color into hue, saturation and lightness.

Your workspace

Processed in your browser

Enter your values or try the example.

This utility converts a standard six-digit or shorthand three-digit HEX color code into the HSL (Hue, Saturation, Lightness) color space. This conversion helps developers align color definitions with CSS standards that rely on HSL for easier color manipulation.

How to convert HEX to HSL

  1. Enter your HEX color code into the input field (e.g., #ff0000 or f00).
  2. The tool automatically calculates and displays the equivalent HSL values, such as hsl(0, 100%, 50%).

Color space limitations

The output uses the sRGB color space, which is standard for web browsers. Because HEX and HSL are different ways of representing the same color data, the conversion is mathematically precise, though the resulting HSL values are rounded to two decimal places for readability.

Example conversion

#ff0000

hsl(0, 100%, 50%)

Questions about HEX to HSL

Does this support alpha channels?

No, this tool only accepts standard three- or six-digit HEX codes without alpha transparency.

How do I interpret the HSL output?

The result is formatted as hsl(H, S%, L%), where H is the degree on the color wheel (0-360), and S and L are percentages representing saturation and lightness.

Continue your workflow

Explore more tools in this category for your next step.