CSS Colors
The Cascading Style Sheets language defines the same number of named colors as the HTML 4 spec, namely the 16 listed previously. Additionally, CSS 2.1 adds the 'orange' color name to the list:
Color | Name | Hex | Red |
Green |
Blue |
Hue |
Satur |
Light |
Satur |
Value |
Alias |
---|---|---|---|---|---|---|---|---|---|---|---|
orange | #FFA500 | 100% | 65% | 0% | 700139000000000000039° | 100% | 50% | 100% | 100% |
CSS 2, SVG and CSS 2.1 also allow web authors to use so-called system colors, which are color names whose values are taken from the operating system, for example, picking the operating system's highlighted text color, or the background color for tooltip controls. This enables web authors to style their content in line with the operating system of the user agent. The CSS3 color module has deprecated the use of system colors in favor of CSS3 UI System Appearance property, which itself was subsequently dropped from CSS3.
The developing CSS3 specification also introduces HSL color space values to style sheets:
/* RGB model */ p { color: #F00 } /* #rgb */ p { color: #FF0000 } /* #rrggbb */ p { color: rgb(255, 0, 0) } /* integer range 0 - 255 */ p { color: rgb(100%, 0%, 0%) } /* float range 0.0% - 100.0% */ /* RGB with alpha channel, added to CSS3 */ p { color: rgba(255, 0, 0, 0.5) } /* 0.5 opacity, semi-transparent */ /* HSL model, added to CSS3 */ p { color: hsl(0, 100%, 50%) } /* red */ p { color: hsl(120, 100%, 50%) } /* green */ p { color: hsl(120, 100%, 25%) } /* dark green */ p { color: hsl(120, 100%, 75%) } /* light green */ p { color: hsl(120, 50%, 50%) } /* pastel green */ /* HSL model with alpha channel */ p { color: hsla(120, 100%, 50%, 1) } /* green */ p { color: hsla(120, 100%, 50%, 0.5) } /* semi-transparent green */ p { color: hsla(120, 100%, 50%, 0.1) } /* very transparent green */Read more about this topic: Web Colours
Famous quotes containing the word colors:
“Then, bringing me the joy we feel when wee see a work by our favorite painter which differs from any other that we know, or if we are led before a painting of which we have until then only seen a pencil sketch, if a musical piece heard only on the piano appears before us clothed in the colors of the orchestra, my grandfather called me the [hawthorn] hedge at Tansonville, saying, You who are so fond of hawthorns, look at this pink thorn, isnt it lovely?”
—Marcel Proust (18711922)