👁️HSL Color Model
Also known as HSL, Hue Saturation Lightness, HSB, HSV
A way to write screen colors as three dials. Each one is easy to turn.
Think of it like
It is like asking for paint by name. Then you say how bright and how light.
Example
Leo's button is hsl(210 80% 50%). For the hover state he uses hsl(210 80% 40%), just a little darker.
Definition
Example code
css
.button { background: hsl(210 80% 50%); }
.button:hover { background: hsl(210 80% 40%); }Common mistake
Key takeaways
- 1Three handles. Hue, saturation and lightness.
- 2Same colors as RGB. Just easier to reason about.
- 3Not perfectly even. Hues differ in how light they look.