Where to find css color codes
Due to this question I need to find the color codes for green
, red
and yellow
so I can translate them into the decimal number used by the rgba()
function. From this site I think green is #008000
which would be rgb(0, 128, 0). But I'd be interested in finding the official source. They didn't appear to be in the CSS spec. Any ideas where they would be?
They can be found in CSS <color>
definition:
The list of color keywords is: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow
You'll find this site useful http://www.quackit.com/html/codes/color/color_names.cfm
The following table contains the color names that are recognized by most, if not all, modern browsers. Most of these are from the list of X11 color names distributed with the X Window System. These color names were standardized by SVG 1.0.
Worth pointing out that the specification extends beyond the basic colour keywords referenced by @Tim Cooper and contains some of the more creative (or, rather, SVG spec names) like "aliceblue" and " lightgoldenrodyellow"
http://www.w3.org/TR/2011/REC-css3-color-20110607/#svg-color
w3 docos contain both the color names and their synonimous hex and rgb values which you may find useful for your task
链接地址: http://www.djcxy.com/p/89354.html上一篇: CSS透明度,而不会影响字体颜色
下一篇: 在哪里可以找到css颜色代码