Hex Color to HSL Converter

Paste a 6-digit hex color and get its HSL equivalent, a hue in degrees plus saturation and lightness percentages, the color model most people find far more intuitive to adjust by hand than raw hex digits. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

Hex colors are compact but not very human-friendly to adjust by hand; HSL breaks a color into a hue you can picture on a color wheel plus saturation and lightness percentages that map naturally onto 'more vivid' and 'lighter or darker' adjustments.

This tool decodes a hex color's red, green, and blue bytes and converts them into HSL using the standard CSS Color Module formula, showing the parsed channels alongside the resulting hue/saturation/lightness.

What Is Hex Color to HSL Converter?

HSL (hue, saturation, lightness) is a cylindrical color model where hue is an angle (0-360 degrees) around a color wheel, saturation (0-100%) is distance from gray toward a fully vivid color, and lightness (0-100%) is distance from black through the pure hue to white.

It's directly supported in CSS via the hsl() function, standardized in the CSS Color Module Level 4 specification, making it a natural target when converting from hex for stylesheet work.

How Hex Color to HSL Converter Works

Red, green, and blue are normalized to 0-1, then lightness is the average of the largest and smallest of the three: L = (max + min) / 2.

If max equals min the color is a shade of gray (hue and saturation are both 0); otherwise saturation is computed from the spread between max and min relative to lightness, and hue is computed from which channel is largest and the relative difference between the other two, then everything is scaled into degrees and percentages.

When To Use Hex Color to HSL Converter

Use this when you want to describe or adjust a hex color's vividness or brightness in a more intuitive way than editing hex digits directly.

It's also useful for generating CSS hsl() values for design systems that prefer HSL-based color tokens over raw hex.

Features

Advantages

  • Produces hue/saturation/lightness values that map intuitively onto everyday color descriptions ('lighter', 'more saturated').
  • Fully reversible with the companion HSL to Hex Color Converter tool, aside from ordinary rounding.
  • Directly usable as CSS's hsl() function syntax.

Limitations

  • Only accepts 6-digit hex input; alpha/transparency isn't part of this conversion (use the RGBA tools for that).
  • Hue, saturation, and lightness are each rounded to whole numbers, which can introduce tiny differences on a strict round-trip through HSL and back.

Examples

Pure red

Input

#FF0000

Output

hsl(0, 100%, 50%)

Red sits at hue 0, is fully saturated, and its lightness (the midpoint between the max=255 and min=0 channel) is exactly 50%.

A muted teal

Input

#1ABC9C

Output

hsl(168, 76%, 42%)

Green is the dominant channel here, placing the hue in the cyan-green range around 168 degrees, with moderate saturation and lightness.

Best Practices & Notes

Best Practices

  • When designing a color palette, adjust lightness and saturation in HSL space, then convert back to hex for use in code, rather than guessing hex digit changes.
  • Keep in mind hue wraps at 360 degrees, so a hue near 359 and a hue near 1 both describe colors very close to red.

Developer Notes

Implements the standard CSS Color 4 / Wikipedia HSL formula exactly (max/min/delta-based hue and saturation, average-based lightness); verified against known reference conversions (pure red, green, blue, white, black, and mid-gray) before shipping.

Hex Color to HSL Converter Use Cases

  • Generating a CSS hsl() color token from an existing hex-based design system color
  • Understanding a brand color's underlying hue and how saturated/light it really is
  • Building color palette variations by adjusting HSL lightness/saturation and converting the results back to hex

Common Mistakes

  • Confusing HSL's lightness with HSV's value; the same color yields different numbers in each model past hue.
  • Assuming a saturation of 0% and a lightness of 50% describes a specific color; at 0% saturation, hue is meaningless and the result is always a shade of gray regardless of lightness.

Tips

  • Use the HSL to Hex Color Converter tool to go the other direction, e.g. after adjusting lightness or saturation by hand.
  • If you need brightness/value semantics instead of lightness, check the Hex Color to HSV Converter tool instead.

References

Frequently Asked Questions