Skip to content
BENIBIX Learn

Hue, Saturation and Lightness

Level 1 · How color works

The three dials that describe any color: hue, saturation and lightness. How HSL and OKLCH write a color so a person can change it by hand.

Course contentsLesson 2 of 13

After this lesson you can

  • Describe a color with three dials
  • Make a tint and a shade
  • Read an HSL color

10 mincovers 5 glossary entries

Worth reading first: Color Theory Basics

The three dials behind every color

Every color can be described with three dials: hue, saturation and lightness. Hue is the color itself, set as an angle on the wheel from 0 to 360 degrees. Red sits at 0, green at 120 and blue at 240. Saturation and lightness each run from 0 to 100 percent.

Hue is what most people mean by color. Red, orange and blue are hues. Moving the hue dial walks you round the wheel, and at 360 degrees you are back at red. Two colors with the same hue are the same family, however light or dull they are.

Saturation is how strong a color is. At 100 percent it is as bold as it can be. At 0 percent all the color is gone and only a gray is left. Turning saturation down is the quickest way to make a loud color calm.

Lightness is how light or dark a color is. At 50 percent you get the pure color. Push it toward 100 and you add white, which makes a tint, like pink from red. Push it toward 0 and you add black, which makes a shade, like maroon.

HSL is a way to write a screen color as those three dials. A strong blue might be written hsl(220, 90%, 50%). To get a lighter blue for a hover state, raise only the last number. That is much easier than working out a new six-digit code by hand.

HSL has one flaw. Two colors with the same lightness number can look very different in brightness. Yellow at 50 percent looks far brighter than blue at 50 percent. OKLCH is a newer way to write color, published in 2020, that fixes this. Its lightness number matches what the eye sees.

A common mistake is to make a color darker by adding black only. The result often looks muddy. Lowering lightness and nudging the hue a little at the same time gives a richer dark. Painters have done this for centuries, and the dials make it easy on a screen.

Hue picks the place on the ring. Saturation sets how strong it is, and lightness how close it sits to white or black.
css
/* one hue, three lightness steps */
--blue-light: hsl(220, 90%, 80%);
--blue:       hsl(220, 90%, 50%);
--blue-dark:  hsl(220, 90%, 30%);

Worked example

A button that needs three blues

Omar's app has a blue button at hsl(220, 90%, 50%). He needs a lighter blue for hover and a darker one for pressed.

He keeps the first two numbers and sets lightness to 60 and 40. All three blues match, and he never opened a color picker.

The words for this lesson5

Check yourself

What happens to a color when its saturation is set to 0 percent?

Finished this lesson?

Marking it complete also marks its 5 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.