A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/css/properties/color below:

color · WebPlatform Docs

color Summary

The color property sets the color of an element’s foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a).

Overview table
Initial value
black, except in a few cases (see notes)
Applies to
All elements
Inherited
Yes
Media
visual
Computed value
For a non-translucent color, an hexadecimal equivalent is used. Otherwise it is the RGBa equivalent
Animatable
Yes
CSS Object Model Property
color
Percentages
NA
Syntax Values
color
CSS color value
Examples

p {color:turquoise}


p {color:#40E0D0}


p { color: rgb(64,224,208) }


p { color: rgb(25.1%,87.8%,81.6%) }


p { color: hsl(174,72%,56%) }




p { color: rgba(64,224,208,0.8) }


p { color: hsla(174,72%,56%,0.8) }

View live example

Usage
 Though CSS color values are precisely defined, they may appear differently between different output devices. Most of them are not calibrated, and some browsers do not support output device color profiles. Without these, color rendering may vary significantly.
Notes Default color

Some browsers change the default color from black to another color in their default css (user-agent stylesheet).

RGB, HSL, RGBa and HSLa support

HSL, RGBa and HSLa are not supported by older browsers (IE6-8), therefore if you do use such colours you should also provide a fallback color property that uses something similar but more widely supported, like a hex value. This should be placed either next to the modern color value but earlier in the cascade, or in a separate stylesheet hidden behind a conditional comment.

Separating foreground from background

In order to make it easier for users to see and hear content including separating foreground from background, [WCAG] indicates the following:

Related specifications
CSS3 Color Module Level 3
W3C Recommendation
Color in CSS1
W3C Recommendation
See also Other articles css color value

See css color value for more information. The color value may be given as:

aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, ...
See [W3C CSS Color Module Recommendation 4.3. Extended color keywords](http://www.w3.org/TR/css3-color/#svg-color) for a complete list of keywords.

- RGB

#00f
#0000ff
rgb(0,0,255)
rgb(0%,0%,100%)
rgba(0,0,255,0.5)
rgba(0%,0%,100%,0.5)
hsl(0, 100%, 50%)
hsla(0, 100%, 50%, 0.5)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4