HSL lets you adjust hue, lightness, and saturation independently — the format CSS custom properties and design systems rely on.

HSL (Hue, Saturation, Lightness) is the color format that modern design systems rely on. Tailwind CSS v3/v4 expresses its entire palette in HSL-derived tokens. Material Design 3 uses HSL-based tonal palettes. CSS custom properties like --color-primary: hsl(217, 91%, 60%) are readable, maintainable, and easy to adjust.
When you receive brand colors from a client as RGB values — say rgb(59, 130, 246) from a Figma file — converting to HSL lets you generate a full tonal scale. Increase L% for lighter variants, decrease L% for darker ones, adjust S% for muted states. No guesswork.
WCAG accessibility audits require specific contrast ratios. HSL makes it straightforward: tweak L% until the foreground/background pair passes AA or AAA threshold without changing the hue at all.
All calculations run locally in your browser — no data is sent to any server.
--brand-500: hsl(217, 91%, 60%) — so Tailwind config and CSS tokens stay in sync.Normalize R, G, B to 0–1. Find max and min channel values. L = (max + min) / 2. S depends on L: if L ≤ 0.5, S = (max−min)/(max+min); if L > 0.5, S = (max−min)/(2−max−min).
Hue depends on which channel is max: if R is max, H = (G−B)/(max−min); if G is max, H = 2 + (B−R)/(max−min); if B is max, H = 4 + (R−G)/(max−min). Multiply by 60°.
HSL is fully reversible — converting HSL back to RGB produces the exact same color.
| Feature | RGB | HSL |
|---|---|---|
| Model | Additive channels | Hue/Saturation/Lightness |
| Values | 0–255 per channel | H: 0–360°, S/L: 0–100% |
| Intuitive | Hard to predict colors | Easy to adjust colors |
| Color theory | Not color-wheel based | Maps to color wheel |
| CSS support | rgb(R, G, B) | hsl(H, S%, L%) |
HSL stands for Hue (0–360°), Saturation (0–100%), Lightness (0–100%). Unlike RGB, where changing one channel shifts multiple perceived properties, HSL lets you adjust one dimension at a time. It is the preferred format for CSS custom properties, Tailwind color tokens, and Material Design tonal palettes.
Keep H and S constant, then generate steps at L: 95%, 80%, 65%, 50%, 35%, 20%, 10%. This produces a complete light-to-dark scale — the same approach Tailwind CSS uses for its built-in color shades.
Define your color as a CSS custom property: --brand: hsl(217, 91%, 60%). In your dark-mode media query, override only the L value: --brand: hsl(217, 91%, 75%). The hue stays identical, the color becomes readable on dark backgrounds.
Reduce the L value. hsl(200, 80%, 50%) → hsl(200, 80%, 30%) gives a darker version of the same blue. This is more predictable than adjusting RGB channels, which can shift perceived hue.
No. In HSL, L=50% is a pure saturated color and L=100% is white. In HSV/HSB, V/B=100% is pure color and V/B=0% is black. Figma uses HSB internally, while CSS uses HSL. They produce different numeric values for the same color.
Add 180° to the hue. hsl(200, 80%, 50%) → hsl(20, 80%, 50%) is the complementary color. Triadic colors are at +120° and +240°. This makes HSL ideal for building color scheme generators.
No. All RGB to HSL calculations run entirely in your browser using JavaScript. Nothing is sent to any server. The tool works offline once the page is loaded.

Have an idea, found a bug, or want to suggest a feature? Drop us a message – we respond within 24 hours.