Book Image

Learning less.js

Book Image

Learning less.js

Overview of this book

Table of Contents (22 chapters)
Learning Less.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Examining color spaces and formats


When we think of colors, most of us will probably think of red, green, or blue, but do we ever think of color spaces? If the answer is no, then think again; you've just mentioned one of several color spaces we can use.

Color spaces are a means of uniquely specifying color. The most well-known one is red, green, and blue (RGB). However, others are available, such as Hue, Saturation, Lightness (HSL), its cousin, which includes alpha support (HSLa) or HSV (Hue, Saturation, and Value). Less includes support for these and others; we will look at these in more detail shortly, but first, let's take a look at using basic mathematical operators to create new colors.

Working with arithmetic operators

How often have you spent hours fine-tuning a palette for a client, only to find they want to change the whole lot? It will be impossible to simply change one color, you will need to change them all…

We can use Less to help us with this. It contains support for a number of...