Less Color Operation

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

Less Color Operation Functions

LESS provides number of useful operation functions to alter and manipulate colors in different ways and take parameters in the same units.

A list of Color Operation Functions supported by Less are described in the following table:

Index

Directives

Description

1)

saturate

It is used to change the intensity or saturation of a color in the element.

2)

desaturate

It is used to decrease the intensity or saturation of a color in the element.

3)

lighten

It is used to increase the lightness of a color in the element.

4)

darken

It is used to change the intensity or saturation of a color in the element.

5)

fadein

It is used to increase the opacity for selected elements.

6)

fadeout

It is used to decrease the opacity for selected elements.

7)

fade

It is used to set the transparency of a color for selected elements.

8)

spin

It is used to rotate the angle of a color for selected elements.

9)

mix

It is used to mix the two colors along with the opacity.

10)

tint

It is used to mix the color with white as you decrease the proportion of the color.

11)

shade

It is used to mix the color with black as you decrease the proportion of the color.

12)

greyscale

It is used to discard the saturation from a color in the selected elements.

13)

contrast

It is used to set the contrast for the colors in the element.