css中的颜色
我常用的是win10里面的自带的3d画图工具里面的颜色表
css 设置颜色的几种方式:
1.颜色名
2.rgb值
3十六进制表示
4. hsl color values
css3 adds numerical hue-saturation-lightness (hsl) colors as a complement to numerical rgb colors. it has been observed that rgb colors have the following limitations:
- rgb is hardware-oriented: it reflects the use of crts.
- rgb is non-intuitive. people can learn how to use rgb, but actually by internalizing how to translate hue, saturation and lightness, or something similar, to rgb.
there are several other color schemes possible. some advantages of hsl are that it is symmetrical to lightness and darkness (which is not the case with hsv for example), and it is trivial to convert hsl to rgb.
hsl colors are encoding as a triple (hue, saturation, lightness). hue is represented as an angle of the color circle (i.e. the rainbow represented in a circle). this angle is so typically measured in degrees that the unit is implicit in css; syntactically, only a <number> is given. by definition red=0=360, and the other colors are spread around the circle, so green=120, blue=240, etc. as an angle, it implicitly wraps around such that -120=240 and 480=120. one way an implementation could normalize such an angle x to the range [0,360) (i.e. zero degrees, inclusive, to 360 degrees, exclusive) is to compute (((x mod 360) + 360) mod 360). saturation and lightness are represented as percentages. 100% is full saturation, and 0% is a shade of gray. 0% lightness is black, 100% lightness is white, and 50% lightness is “normal”.
颜色对照表地址:http://tool.oschina.net/commons?type=3