Skip to content

Hex to HSL

Turn a hex code into hue, saturation and lightness.

How to use the hex to HSL

Three steps, all in your browser.

  1. 1

    Enter a color

    Type or paste a code in any format, or use the picker.

  2. 2

    See every format

    The converted values update as you type, in every format at once.

  3. 3

    Copy the codes

    Copy any color code in one click, or share the page link.

Hex to HSL: what to know

Hex to HSL converts a hex color code into hue, saturation and lightness. Hue is the color's angle on the color wheel (0° red, 120° green, 240° blue), saturation is how vivid it is, and lightness runs from black at 0% through the pure color at 50% to white at 100%.

HSL is popular in CSS because it's easy to adjust by hand. Want a lighter version of a button color for its hover state? Keep the hue and saturation and raise the lightness. Want a muted background? Lower the saturation. With hex you'd have to recalculate all three channels.

The trade-off is that HSL lightness isn't perceptual: yellow at 50% lightness looks far brighter than blue at 50%. For palettes where colors need to look equally light, convert to OKLCH instead.

Popular uses

  • Creating hover and active states from a base color
  • Building CSS custom properties that are easy to tweak
  • Understanding which hue family a hex code belongs to
  • Making muted or pastel variants of brand colors

Tips for the best result

  • To make a tint, raise lightness; to make a shade, lower it, keeping hue and saturation.
  • Grays have 0% saturation, and their hue doesn't matter.
  • Modern CSS accepts hsl(333 71% 51%) without commas, and with / 0.5 for alpha.

Read how JustYourPalette works, browse named colors and curated palettes, and see our privacy details. Colors you enter and images you open are processed in your browser and are never sent to our server.

Frequently asked questions

HSL describes a color the way people think about it: which hue, how vivid and how light. That makes it easy to create a lighter tint or a muted version of a hex color by changing one number.

Hue is an angle from 0 to 360 degrees (0 red, 120 green, 240 blue), and saturation and lightness are percentages from 0% to 100%. Lightness 50% gives the purest version of a hue.

No. Every tool runs in your browser, so the colors you enter and any image you open are processed on your device and are not sent to our server or stored. Reloading or closing the page clears them.

Yes. Every tool is free with no sign-up and no limits on use. Clearly labeled ads keep it that way.

Yes. Colors and color codes aren't owned by anyone, so you can use anything you make here in personal and commercial projects. Brand colors may still be protected as part of a trademark.