Web Colors - CSS Colors

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:

Colors added in CSS 2.1
Color Name Hex triplet 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 will also introduce 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 Colors

Famous quotes containing the word colors:

    Adultery is the vice of equivocation.
    It is not marriage but a mockery of it, a merging that mixes love and dread together like jackstraws. There is no understanding of contentment in adultery.... You belong to each other in what together you’ve made of a third identity that almost immediately cancels your own. There is a law in art that proves it. Two colors are proven complimentary only when forming that most desolate of all colors—neutral gray.
    Alexander Theroux (b. 1940)