How to use the Hsl color functions in Css
In this video we will take a look at how we can ditch hex colors and adopt the amazing Hsl and Hsla functions inside of our css.
Check out this codepen and take a view minutes to try it out for yourself.
I promise you'll love it.
Subscribe and Follow
Subscribe to my Youtube channel.
Thanks for watching and stay safe
Top comments (4)
Isn't
rgba()
,hsla()
, etc. redundant now?Instead, use
hsl(0 % % / %);
, where the alpha is optional.It's friendlier with CSS variables too (
hsl(var(--color) / %);
).Oh cool, i didn't know that was possible.
Thanks for sharing Daniel! :)
Happy to help!
And long live
hsl
, the best format! πYeah i realy love it! No more jumping into photoshop etc to find a color! π