Blog
Wild & Free Tools

What Is HSL Color? Hue, Saturation, and Lightness Explained

Last updated: March 2026 5 min read
Quick Answer

Table of Contents

  1. The Three HSL Components
  2. HSL vs RGB vs Hex
  3. HSL in CSS
  4. When to Use HSL
  5. Frequently Asked Questions

HSL is a color model that describes colors the way humans think about them: as a base hue (what color), a saturation (how vivid), and a lightness (how bright or dark). The converter above shows the HSL value alongside RGB for any hex code you enter.

Unlike RGB, where you need to change all three channels to create a lighter version of a color, HSL lets you adjust just the lightness value. That makes it especially useful for generating color scales and design system tokens in CSS.

The Three HSL Components Explained

Hue (0-360 degrees)

Hue is the base color, expressed as a degree on a color wheel. 0 and 360 are both red. As the value increases, the color rotates: 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 is magenta, back to 360 (red).

Saturation (0-100%)

Saturation controls color intensity. 100% is the most vivid version of that hue. 0% is a neutral gray regardless of the hue value — all the color drains away.

Lightness (0-100%)

Lightness controls brightness. 0% is always black. 100% is always white. 50% gives the purest, most normal version of the color. Values below 50% darken the color; values above 50% lighten it toward white.

How HSL Compares to RGB and Hex

All three formats describe the same colors — they are just different ways of expressing the same data.

The hex code #3B82F6 converts to hsl(217, 91%, 60%) — a vivid blue at medium lightness. The converter above shows all three formats together.

Sell Custom Apparel — We Handle Printing & Free Shipping

Using HSL Colors in CSS

CSS accepts HSL natively:

.btn-primary {
  background: hsl(217, 91%, 60%);
}

/* Lighter version — just increase lightness */
.btn-primary:hover {
  background: hsl(217, 91%, 70%);
}

/* Darker version */
.btn-primary:active {
  background: hsl(217, 91%, 50%);
}

CSS also supports hsla() for transparency, and the modern space-separated syntax: hsl(217 91% 60%) (no commas). Both are fully supported in current browsers.

This predictability — adjusting one value to generate a whole scale — is why many design systems define tokens in HSL and why tools like Tailwind CSS compute their color scales using HSL math internally.

When to Use HSL Instead of RGB or Hex

HSL is the right choice when:

Hex and RGB are better for static, exact colors from a design file. Use HSL when you need to reason about or generate color variations in code.

See the HSL Value for Any Hex Code

Paste any hex code into the converter above — RGB and HSL are shown side by side instantly.

Open Hex to RGB Converter

Frequently Asked Questions

What is the difference between HSL and HSV/HSB?

HSL (Hue, Saturation, Lightness) and HSV/HSB (Hue, Saturation, Value/Brightness) are related but not identical. In HSL, 50% lightness is the pure color and 100% is white. In HSV, 100% value is the pure color and 0% is black. Adobe tools use HSB; CSS uses HSL.

How do I convert hex to HSL manually?

Convert hex to normalized RGB (divide by 255), then apply the HSL formulas: find max and min of R, G, B; L = (max+min)/2; S = (max-min)/(1-|2L-1|) if L != 0 or 1; H depends on which channel is max. In practice, use the converter — it handles all this automatically.

Is HSL supported in all browsers?

Yes. hsl() and hsla() have been supported in all major browsers since 2010. The modern comma-free syntax (hsl(217 91% 60%)) is supported in browsers from 2019 onward.

What does hsl(0, 0%, 50%) look like?

A medium gray. When saturation is 0%, all hue information is stripped and the color becomes a neutral gray. Lightness 0% is black, 100% is white, and 50% is exactly mid-gray (#808080).

Andrew Walsh
Andrew Walsh Developer Tools & API Writer

Andrew worked as a developer advocate at two SaaS startups writing API documentation used by thousands of engineers.

More articles by Andrew →
Launch Your Own Clothing Brand — No Inventory, No Risk