Working with color functions

The functions available within Less can be used to provide some interesting colors. It is worth taking the time to familiarize yourself with the options available, particularly as it is possible to produce the same color using different methods!

The functions can be split into four groups—they cover color definition, channels, operations, and blending. Let's take a look at each group of functions in turn, starting with defining color formats.

Defining color formats

Before we can alter colors, we naturally need to define them. We could simply provide a HEX code, but this isn't always sufficient; Less allows us to do more. Less provides a number of methods to obtain colors using different formats, and these are the three ...

Get Learning Less.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.