Skip to content

Hex to HSL color converter online

Convert `#RGB`, `#RRGGBB`, or `#RRGGBBAA` into CSS `hsl()` / `hsla()` with a live swatch. Designers copy hex from a picker but want HSL in stylesheets to nudge lightness or saturation without hex math.

HSL separates hue, saturation, and lightness — tweaking “a bit darker” is often easier than editing hex nibbles.

Eight-digit hex with alpha maps to hsla; opaque colors output hsl.

Minor differences vs. design apps can happen across color spaces — trust the preview swatch.

How to convert

  1. Enter hex
  2. Check HSL output and swatch
  3. Copy into CSS

What HSL is useful for

  • Build lighter/darker variants in CSS variables.
  • Align code with hex from design handoff.
  • Instant preview cuts trial and error.

Scenarios

  • Brand hex → hsl custom property
  • Button hover via lightness shift
  • Inspect alpha in an 8-digit hex

Tips

  • Hash `#` optional on input.
  • Short `#abc` expands to `#aabbcc`.
  • Copy hsl vs. hsla depending on alpha need.

Examples

InputOutputNote
#FF5733hsl(...)Opaque
#FF573380hsla(...)Semi-transparent

Hex to HSL FAQ

Relation to RGB converter?
Site also has hex↔RGB. HSL is often nicer for perceptual light/dark tweaks.
Mismatch vs. Figma?
Rounding and gamut differ — judge on your target browser.

Related tools