把颜色变成360° 圆,0 或 360 为红,120 为绿,240 为蓝。 饱和度(s) 0% - 100%,越高颜色越纯,越低则越淡,0% 为灰色。 0% 为灰色可理解为没有颜色,此时亮度为 50%,显示灰色。 亮度(l) 0% 为黑色,100% 为白色,50% 为黑白之间。 如果饱和度为 0%,50% 黑白之间为显示灰色 hsl 函数 CSS 中...
Silver (0°,0%,75%) #BFBFBF (191,191,191) Gray (0°,0%,50%) #808080 (128,128,128) Maroon (0°,100%,25%) #800000 (128,0,0) Olive (60°,100%,25%) #808000 (128,128,0) Green (120°,100%,25%) #008000 (0,128,0) Purple (300°,100%,25%) #800080 (128,0,128) Te...
.red-box { /* This is a very-red box in sRGB: */ background: lch(50% 120 20); /* This is an identical color in sRGB, but will appear MUCH REDDER in the wider-gamut displays of the future: */ background: lch(50% 500 20); } LCH has been adopted surprisingly quickly, and ...
Enter red color (R): RGB to HSL conversion formula TheR,G,Bvalues are divided by 255 to change the range from 0..255 to 0..1: R' =R/255 G' =G/255 B' =B/255 Cmax= max(R',G',B') Cmin= min(R',G',B') Δ =Cmax-Cmin Hue calculation: Saturation calculation: Lightness ...
Black #000000 (0,0,0) (0°,0%,0%) White #FFFFFF (255,255,255) (0°,0%,100%) Red #FF0000 (255,0,0) (0°,100%,50%) Lime #00FF00 (0,255,0) (120°,100%,50%) Blue #0000FF (0,0,255) (240°,100%,50%) Yellow #FFFF00 (255,255,0) (60°,100%,50%) Cyan #...