mozilla

Revision 41478 of <color>

  • Revision slug: CSS/color_value
  • Revision title: color (CSS data type)
  • Revision id: 41478
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment 6 words added, 46 words removed; page display name changed to 'color value'

Revision Content

{{ CSSRef() }}

{{ Fixall() }}

Summary

Many of the CSS properties accepts a color as a value. color and background-color. border are the common CSS properties that need color as a value. And in CSS a color value can be specified in any of the following ways:

  • as a hexidecimal RGB value
  • as a regular RGB or RGBA {{ Fx_minversion_inline("3") }} value
  • as a regular HSL or HSLA {{ Fx_minversion_inline("3") }} value
  • as one of the pre-defined color keywords

Specifications

See Also

{{ Cssxref("color") }}, {{ Cssxref("background-color") }}, {{ Cssxref("border-color") }}, {{ Cssxref("outline-color") }}, {{ Cssxref("text-shadow") }}, {{ Cssxref("-moz-box-shadow") }}

{{ languages( { "fr": "fr/CSS/valeur_de_couleur" } ) }}

Revision Source

<p> {{ CSSRef() }}
</p><p>{{ Fixall() }}
</p>
<h3 name="Summary"> Summary </h3>
<p>Many of the CSS properties accepts a color as a value.
<code>color</code> and <code>background-color</code>. <code>border</code> are the common CSS properties that need color as a value. And in CSS a color value can be specified in any of the following ways:
</p>
<ul><li> as a hexidecimal RGB value
</li><li> as a regular RGB or RGBA {{ Fx_minversion_inline("3") }} value
</li><li> as a regular HSL or HSLA {{ Fx_minversion_inline("3") }} value
</li><li> as one of the pre-defined color keywords
</li></ul>
<h3 name="Specifications">Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color" title="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">CSS 2.1 Syntax</a></li> <li><a class="external" href="http://www.w3.org/TR/css3-color/#colorunits" title="http://www.w3.org/TR/css3-color/#colorunits">CSS 3 Color</a></li>
</ul><h3 name="See_Also"> See Also </h3>
<p>{{ Cssxref("color") }}, {{ Cssxref("background-color") }},
{{ Cssxref("border-color") }},
{{ Cssxref("outline-color") }},
{{ Cssxref("text-shadow") }},
{{ Cssxref("-moz-box-shadow") }}
</p>
<div class="noinclude">
</div>
{{ languages( { "fr": "fr/CSS/valeur_de_couleur" } ) }}
Revert to this revision