DEV Community

Discussion on: Why `hsl` is better

Collapse
 
venelinn profile image
Venelin

Great explanation! Thank you !
Would you mind share some examples?

Collapse
 
siddharthshyniben profile image
Siddharth • Edited

Sure thing!

According to what I said, if you set hue to 240, you get blue. So I just took 240 as the hue, and 50% as the saturation and the lightness, and I got this pleasing blue:

Blue

Which looks way better than the #0000ff blue.

Base Blue

Here's a red (hsl(0, 50%, 50%)) and a green (hsl(120, 50%, 50%))

Red
Green