📜  LESS颜色运算功能

📅  最后修改于: 2021-01-06 04:42:37             🧑  作者: Mango

较少的色彩操作功能

LESS提供了许多有用的操作功能,可以以不同的方式更改和操纵颜色并以相同的单位获取参数。

下表描述了Less支持的色彩操作功能列表:

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.