color property sets the color for an element's text content. It also sets the currentcolor value, which may be used as an indirect value on other properties, and is the default for other color properties, such as border-color.
|Default value||depends on the browser|
|Applies to||all elements|
|Computed value||as specified|
|Animatable||yes See animatable properties. Demo|
The following example shows how to use
color: rgb(0, 255, 0);
It is important to ensure that the contrast ratio between the background color and the color of the text placed over it is high enough that people experiencing low vision conditions will be able to read the content of the page.
This tool makes it easy to create, adjust, and experiment with custom colors for the web. It also makes it easy to convert between various color formats supported by CSS, including: HEXA colors, RGB (Red/Green/Blue) and HSL (Hue/Staturation/Lightness). Control over the alpha channel is also supported on RGB (rgba) and HSL (hsla) formats.
This tool will help you identify the perfect CSS colors to apply to your HTML.Go to Color Picker Tool
You can learn more about CSS colors in our CSS Color tutorial.
The numbers in the table specify the first browser version that fully supports the
The following table describes the values of
|color||Specifies the color of the text|
|initial||Sets this property to its default value|
|inherit||Inherits this property from its parent element|