30

HSL, HSV, and HSB: The Cylindrical Color Models

RGB is how a screen produces color. It is a terrible way for a human to choose one. Ask someone to make red "a little lighter" in RGB and they freeze; ask in HSL and they already know which dial to turn. This article is the complete, interactive tour of the cylindrical color models - hue, saturation, lightness and value - the math that links them back to RGB, and the moment you should reach past them for something perceptual.

Digital · 21 6 Live Demos ~40 min read HSL · HSV · HSB · HWB
360°
Hue wheel range
1978
Formalized by Alvy Ray Smith
3
Intuitive axes
1:1
Reversible with sRGB
00

Advanced cylindrical model workbench

HSL, HSV, HSB, and HWB are easy to talk about because they turn RGB into dials. The hidden cost is that each dial means something different depending on the model. This workbench lets you move one coordinate set through all four systems, then asks the production questions: what does the swatch become, how stable is the ramp, how even is the lightness, and which model should own the next edit?

Interactive 00 - Advanced HSL / HSV / HWB workbench

Inspect one color as a picker state, design token, ramp, and perceptual warning

Pick a base color or edit the dials directly. The canvas compares the HSL bicone, HSV/HSB cone, HWB tint-shade mix, hue interpolation path, ramp steps, and relative luminance drift. The meters show where the model is useful and where it starts lying.

#2F80ED
HSL theme ramp
Design tokens
Shorter arc
212 deg
84%
56%
93%
18%
7%
9 steps
0.35
Active swatch Calculating...
Model coordinates Calculating...
Ramp behavior Calculating...
Production choice Calculating...
Contrast note Calculating...
Picker fit0%
Ramp stability0%
Perceptual honesty0%
Contrast safety0%
Model warning HSL and HSV are excellent picker languages, not perceptual measurement spaces.
01

Why a model beyond RGB

A monitor mixes three lights - red, green, and blue - so the most direct way to drive it is to name those three amounts. That is RGB, and it maps perfectly onto the hardware. The trouble is that the three numbers are device coordinates, not human ones. The triple (214, 92, 92) tells you nothing about whether the color is light or dark, vivid or muted, warm or cool, until you compute it in your head.

When people describe color in words, they almost never reach for primaries. They say "a deep teal," "a washed-out pink," "the same blue but brighter." Those three intuitions - which color, how pure, how bright - are exactly the three axes of the cylindrical models. HSL and HSV take the RGB cube and twist it into a cylinder so that one axis is the hue you can name, one is how saturated it is, and one is a brightness-like value you can raise or lower on its own.

RGB thinks in
How much red, green, and blue light to emit. Native to the display, alien to the eye. Changing "brightness" means moving all three numbers together by the right ratios.
HSL / HSV think in
Which hue, how saturated, how light or bright. One word per axis, each adjustable without disturbing the others - the way a person reasons about a color.
The catch
These models are a pure geometric reshuffle of the same sRGB numbers. They are intuitive, but not perceptually uniform - a fact that matters enormously and that we return to in section 09.
One sentence to keep: HSL and HSV do not contain any more information than RGB. They re-coordinate the exact same gamut so that human-friendly adjustments become single-axis moves. Everything you can express in one you can express in the other - the conversion is lossless and reversible.
02

The cylinder: hue, saturation, lightness

Picture the RGB color cube standing on its black corner with white at the top. Tilt it so the black-to-white diagonal becomes vertical, then look down the axis: the six other corners - red, yellow, green, cyan, blue, magenta - fan out into a ring. That ring is the hue circle. Squash the projection into a smooth disc and stack discs along the vertical axis, and the cube becomes a cylinder. The three cylindrical coordinates are:

Hue (H) — the angle
Position around the wheel, 0–360°. 0° red, 120° green, 240° blue, wrapping back to red. This is the "which color" axis and it is identical in HSL, HSV, and HWB.
Saturation (S) — the radius
Distance from the central gray axis to the rim. 0% is neutral gray; 100% is the most colorful version available at that height. "How pure."
Lightness / Value — the height
Position along the vertical axis. This is where HSL and HSV disagree: HSL calls it lightness and centers pure color at the middle; HSV calls it value and puts pure color at the top.

The shape that height axis carves out is the giveaway. HSV is a cone (sometimes drawn as a cylinder with a dark tip): the disc is full size at the top and shrinks to a single black point at the bottom. HSL is a double cone, or bicone: it pinches to black at the bottom and to white at the top, with the widest, most saturated ring in the middle. Hold that picture - it explains every behavioral difference between the two.

"Hue is the note, saturation is the volume, and lightness is whether the room lights are on. You can turn any one without touching the other two - that is the whole appeal." Editorial summary · the cylindrical intuition
03

HSL up close

HSL stands for hue, saturation, lightness. Its defining trait is that L behaves symmetrically: L = 0% is always black, L = 100% is always white, and L = 50% is where the pure, fully-saturated hue lives. Saturation then says how far from a neutral gray of that same lightness the color sits.

This makes HSL pleasant for building tints and shades. Keep H and S fixed, push L up toward 100% and you get progressively paler tints; pull it down toward 0% and you get darker shades - the kind of swatch ramp a design system wants. It is also why HSL is the model CSS chose first: hsl(210 80% 45%) reads almost like a sentence.

Interactive 01 · HSL studio

Turn each dial and watch the color move

Drag hue, saturation, and lightness independently. Notice that at L = 0% or L = 100% the hue and saturation stop mattering - you are at the black tip or the white tip of the bicone. The slider tracks recolor to preview where each dial leads.

CSS: hsl(210 80% 45%) HEX: #1773cf RGB: 23, 115, 207
04

HSV / HSB up close

HSV stands for hue, saturation, value - and HSB (hue, saturation, brightness) is the very same model under a different name, the one Adobe tools prefer. Here the third axis, V, measures how close the color is to the brightest light the display can give for that hue. V = 0% is black; V = 100% with full saturation is the most vivid version of the hue. Crucially, value alone never produces white - you only reach white by also pulling saturation down to zero at V = 100%.

That geometry mirrors how a painter or a screen actually behaves: turning the "brightness" up on a saturated red gives you a brighter, still-saturated red, not pink. This is why HSV is the model behind most classic color pickers - the big square-plus-hue-bar picker is an HSV slice, with saturation on one axis and value on the other.

Interactive 02 · HSV / HSB studio

The same three intuitions, a different ceiling

Set hue and saturation, then sweep value. Compare the feel to the HSL studio above: here V = 100% gives you the most saturated color, never white. To get white you must drop saturation to 0. The readout shows HSB because the numbers are identical to HSV.

HSB: hsb(210, 85%, 81%) HEX: #1f77cf RGB: 31, 119, 207
05

HSL vs HSV: the same color, two maps

The single most asked question about these models is "what is the difference?" The honest short answer: they share H, but their S and the third axis mean different things. A saturation of 100% in HSL is not the same number as 100% in HSV unless you are at the very top of HSV (V = 100%) or the exact middle of HSL (L = 50%). And the third axis diverges hard at the extremes.

Interactive 03 · Same inputs, two models

Feed identical H, S, and a shared third value into both

The two panels take the same hue and saturation, and the same third-axis number fed into HSL's lightness and HSV's value. Watch what happens as you push the third slider to 100%: HSL marches to white, HSV marches to the most vivid hue. They only agree in the middle range.

HSL #e2bef4
HSV #a641d9
Move the third slider to compare the two interpretations.
Question HSL answer HSV / HSB answer
Top of the axis (L/V = 100%) Always white Brightest version of the hue
Where is the pure hue? L = 50%, S = 100% V = 100%, S = 100%
How do I make a pale tint? Raise L toward 100% Raise V and lower S together
Best mental fit Tint/shade ramps, CSS, themes Color pickers, "brightness" UIs
Shape Bicone (pinches at both ends) Cone (pinches at black only)
Rule of thumb. If you are building light/dark variants of a brand color, HSL's lightness axis is the friendlier dial. If you are building a pick-a-color UI where users expect a "brightness" slider that keeps colors vivid, HSV is the better mental model.
06

Hue and the color wheel

Because hue is an angle, it is naturally drawn as a wheel - the artifact every color picker, harmony tool, and paint app puts front and center. The angle gives the hue; the distance from the center gives the saturation; a separate slider sets the value (or lightness). Two colors 180° apart are complementary; three colors 120° apart form a triad; small offsets give analogous schemes. All of color harmony is, at bottom, arithmetic on this one angle.

Interactive 04 · HSV color wheel

Click anywhere on the wheel to pick a color

The wheel is a flat HSV slice at the value you set with the slider. Angle is hue, radius is saturation. Click to drop a marker and read its H, S, V and hex. The faint spokes mark the complementary (180°) and triadic (±120°) partners of your pick.

HSV: 0°, 0%, 100% HEX: #ffffff complement: 180°
07

The conversion math

Both models start from the same three quantities computed on the normalized RGB triple (each channel scaled to 0–1): the channel maximum, the minimum, and their difference, the chroma C = max − min. Hue comes from which channel is on top and by how much; everything else follows.

H = 60° × ( (G − B) / C mod 6 )  if max = R
H = 60° × ( (B − R) / C + 2 )    if max = G
H = 60° × ( (R − G) / C + 4 )    if max = B Hue is identical for HSL and HSV. If C = 0 the color is gray and hue is undefined (taken as 0).

The third axis is where they split. HSV's value is simply the maximum channel; its saturation is chroma relative to that maximum. HSL's lightness is the midpoint of max and min; its saturation is chroma relative to how far lightness is from the nearest end of the scale.

V = max         SHSV = (max = 0) ? 0 : C / max
L = (max + min) / 2    SHSL = (L = 0 or L = 1) ? 0 : C / (1 − |2L − 1|) Two different "saturations" from the same chroma - the reason an HSL and HSV S value rarely match.

Going back from HSL or HSV to RGB inverts these. A clean way to write the reverse is the chroma form: recover chroma C, find a base color from the hue sector, then add a per-model offset m to lift it into place.

C = (1 − |2L − 1|) × S  (HSL)   |   C = V × S  (HSV)
X = C × ( 1 − | (H / 60°) mod 2 − 1 | )
m = L − C / 2  (HSL)   |   m = V − C  (HSV) (R,G,B) = (R′+m, G′+m, B′+m), where (R′,G′,B′) is the C/X/0 triple chosen by the 60° hue sector.
Implementation note. The hue formula uses a modulo that can go negative in naive code; always normalize H into 0–360° afterward. And because conversion is exact, a round-trip RGB → HSL → RGB returns the original bytes (within rounding) - these are not lossy transforms, just different coordinates on the same gamut.
08

HWB, the CSS Color 4 newcomer

HWB - hue, whiteness, blackness - was proposed by Alvy Ray Smith in 1996 as an even more intuitive picker and was adopted into CSS Color 4 as hwb(). It keeps the same hue, then asks two plain questions: how much white is mixed in (W), and how much black (Bl). Pure hue is W = 0%, Bl = 0%. If W + Bl ≥ 100%, the hue washes out to a gray equal to W / (W + Bl).

It is the same cone geometry as HSV seen from a tint/shade angle, and it converts cleanly: whiteness is the channel minimum, blackness is one minus the channel maximum. Whether you prefer HWB is mostly taste - but it is now a first-class CSS citizen, so it is worth being able to read.

Interactive 05 · Universal model converter

Pick or type a color, read it in every model

Use the swatch picker, type a hex code, or tap a preset. The panel reports the same color as RGB, HSL, HSV/HSB, and HWB simultaneously - the clearest way to feel how the four coordinate systems describe one identical point in the gamut.

RGB
46, 139, 87
HSL
146°, 50%, 36%
HSV / HSB
146°, 67%, 55%
HWB
146°, 18%, 45%
hsl(146 50% 36%)
09

Where the cylinders break down

For all their intuitiveness, HSL and HSV carry a flaw that bites the moment you trust the numbers too much: they are not perceptually uniform. They were built from sRGB with simple algebra, with no model of human vision in the loop. Equal numeric steps do not produce equal visual steps.

Lightness lies
A pure blue at HSL L = 50% looks far darker than a pure yellow at L = 50%, because the model ignores the eye's wildly different sensitivity to each hue. "Same lightness" is a math claim, not a visual one.
Hue is uneven
The perceptual gap between 0° and 30° is not the same size as the gap between 180° and 210°. Stepping hue in equal degrees gives lumpy, unevenly spaced palettes - greens hog a huge arc, others crowd.
Saturation is fake
HSL/HSV saturation is a geometric ratio, not real colorfulness (chroma). Two colors at S = 60% can look dramatically different in vividness.
Gradients band
Interpolating in HSL between two hues swings through hues you did not want and can dip dark in the middle - the classic muddy or rainbow-y gradient artifact.
When you need fairness, leave the cylinder. For accessible contrast, evenly-stepped palettes, smooth gradients, or "make this 10% lighter and mean it," use a perceptual space: CIELAB / LCh or the modern Oklab / Oklch. Oklch keeps the same friendly hue-chroma-lightness shape as HSL but with axes that actually track perception, and it is now in CSS as oklch().

None of this makes HSL or HSV wrong - it makes them the right tool for fast, human-readable adjustment and the wrong tool for measurement. Knowing the boundary is the whole skill.

10

Using them in practice

The cylindrical models earn their keep anywhere a human or a small piece of code needs to manipulate color by intent rather than by primary. A few of the most common, durable uses:

CSS color authoring
Modern CSS supports hsl(), hwb(), and oklch() directly. hsl() reads clearly and lets a theme derive hover/active states by nudging L by a few percent.
Design tokens & ramps
Generate a 50–900 shade scale by fixing H and S and stepping L. Quick and legible - though for visually even steps a perceptual space is better.
Color pickers
The ubiquitous square-and-hue-bar picker is an HSV slice: saturation across, value down, hue on the rail. Users intuit it instantly.
Harmony & theming
Rotate hue by 180°, ±120°, or ±30° to build complementary, triadic, and analogous schemes from a single seed color.
Quick image tweaks
"Desaturate," "shift hue," and "boost vibrance" controls map naturally onto S and H. Fast, predictable, good enough for non-critical edits.
Procedural / generative art
Sweeping hue over time or space produces rainbows for free; randomizing within a fixed S and L band keeps a generated palette coherent.

A practical pattern worth stealing: author your base colors in HSL for readability, but run your contrast checks and your shade ramps through a perceptual space so the results are honest. Use each model for what it is good at.

11

Pitfalls and gotchas

Confusing S across models
An HSL saturation of 100% and an HSV saturation of 100% are different colors unless lightness/value also lines up. Never copy an S value between the two models.
Assuming equal lightness looks equal
L = 50% blue is not as bright as L = 50% yellow. Do not use HSL lightness as a stand-in for accessible contrast - use relative luminance or APCA.
Hue at the gray axis
When saturation is 0, hue has no meaning. Code that reads hue from a gray can return 0 or NaN; guard for it before interpolating.
Interpolating hue the short way
Hue is circular: blending 350° to 10° should cross 0°, not run backwards through 180°. Pick the shorter arc explicitly.
HSB vs HSV name confusion
They are identical. If a tool says HSB and your code says HSV, no conversion is needed - just match the field order H, S, B/V.
Forgetting it is still sRGB
HSL/HSV inherit sRGB's gamut and its non-linear encoding. They are not a wider space and not a linear-light space; do not blend light in them.
"HSL and HSV are the friendliest way to say a color and one of the worst ways to measure one. Use them to talk to humans, not to certify a match." Editorial summary · the cylinders in production
12

Test your understanding

Six questions on the cylindrical models. Instant feedback, no scores recorded - a wrong answer comes with a short explanation pointing you back to the right section.

Quick check

Loading…
 
Question 1 of 6
13

Continue your journey

These pieces sit directly upstream and downstream of the cylindrical models. The numbers reflect each article's position in the editorial roadmap of 113.