description
less provides number of useful color functions to alter and manipulate colors in different ways. less supports some of the color definition functions as shown in the table below −
| sr.no. | function & description | example |
|---|---|---|
| 1 |
rgb it creates color from red, green and blue values. it has following parameters −
|
rgb(220,20,60) it converts color with rgb values as − #dc143c |
| 2 |
rgba it determines color from red, green, blue and alpha values. it has the following parameters −
|
rgba(220,20,60, 0.5) it converts color object with rgba values as − rgba(220, 20, 60, 0.5) |
| 3 |
argb it defines hex representation of color in #aarrggbb format. it uses the following parameter −
|
argb(rgba(176,23,31,0.5)) it returns the argb color as − #80b0171f |
| 4 |
hsl it generates the color from hue, saturation and lightness values. it has following parameters −
|
hsl(120,100%, 50%) it returns the color object using hsl values as − #00ff00 |
| 5 |
hsla it generates the color from hue, saturation, lightness and alpha values. it has the following parameters −
|
hsla(0,100%,50%,0.5) it specifies the color object using hsla values as − rgba(255, 0, 0, 0.5); |
| 6 |
hsv it produces the color from hue, saturation and value values. it contains following parameters −
|
hsv(80,90%,70%) it converts color object with hsv values as − #7db312 |
| 7 |
hsva it produces the color from hue, saturation, value and alpha values. it uses the following parameters −
|
hsva(80,90%,70%,0.6) it specifies color object with hsva values as − rgba(125, 179, 18, 0.6) |