HTML & CSS
Article

More Colors with Less

By Sandy Ludosky

It’s simple to compute data and perform calculations directly in your stylesheet using Less. It’s also simple to create and mix colors in your stylesheet — without having to use a color picker.

Watch me as I show you how to create new colors from existing colors with the lighten() and darken() functions. Join me and learn how to make CSS more dynamic and rich in colors with the power of Less.

Want to see how much more you can do with Less? Come and watch my new course Introduction to Less on Learnable. I’ve got you covered.

More:

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

Comments
Matthieu_Cneude

The thing is: I hate the darken / lighten functions. I used them a lot before and the result was always colours everywhere and lost of the colour consistency. In a nutshell: a big colour mess.

I prefer defining all my colours at the very beginning and not playing with those functions.

Sedgar1

Thanks Sandy. It's not something I have played around with before, but the insight you provided has wet my appetite. Thanks for taking the time out to show us.

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in Front-end, once a week, for free.