Less教程
Less函数

Less 彩色通道

Less颜色通道函数

颜色通道功能less是内置功能,用于设置通道的值。通道根据颜色定义设置值。 HSL颜色由色调,饱和度和亮度通道组成,而RGB颜色由红色,绿色和蓝色通道组成。
颜色通道功能列表:
功能 说明 示例
hue 在hsl颜色空间中,提取颜色对象的色相通道。 background: hue(hsl(80, 90%, 40%)); it compiles in the CSS to show only hue value as: background: 80;
saturation 在hsl颜色空间中,提取颜色对象的饱和度通道。 background: saturation(hsl(80, 90%, 40%)); it compiles in the CSS to show only saturation value as: background: 90%;
lightness 在hsl颜色空间中,亮度通道是从颜色对象中提取的。 background: lightness(hsl(80, 90%, 40%)); it compiles in the CSS to show only lightness value as: background: 30%;
hsvhue 在hsv颜色空间中,颜色对象的色相通道被提取。 background: hsvhue(hsv(80, 90%, 40%)); it compiles in the CSS to show hue value as: background: 80;
hsvsaturation 在hsl颜色空间中,提取颜色对象的饱和度通道。 background: hsvsaturation(hsv(80, 90%, 40%)); it compiles in the CSS to show only saturation value as: background: 90%;
hsvvalue 在hsl颜色空间中,从颜色对象中提取了值通道。 background: hsvvalue(hsv(80, 90%, 40%)); it compiles in the CSS to show value as: background: 40%;
red 红色通道是从颜色对象中提取的。 background: red(rgb(10, 20, 30)); it compiles in the CSS to show only red value: background: 10;
green 绿色通道是从颜色对象中提取的。 background: green(rgb(10, 20, 30)); it compiles in the CSS as shown below:background: 20;
blue 蓝色通道是从颜色对象中提取的。 background: blue(rgb(10, 20, 30)); it compiles in the CSS to show only blue value: background: 30;
alpha 提取颜色对象的Alpha通道。 background: alpha(rgba(5, 15, 25, 1.5)); it compiles in the CSS to show alpha value as: background: 2;
luma luma值是根据颜色对象计算的。 background: luma(rgb(50, 250, 150)); it compiles in the CSS to show luma value as: background: 71.2513323%;
luminance 亮度值是在没有伽马校正的情况下计算的。 background: luminance(rgb(50, 250, 150)); it compiles in the CSS as shown below: background: 78.53333333%;
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4