Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. color

color

Specifies the text color (font color).

Sample Code

div.test { color: #0000ff;}
div.test1 { color: red;}

Available Values

ValueDescription
Color code or color nameChanges the text color to the specified color. Color codes can be specified using 8-bit, 16-bit, or RGBA color models. For a list of available color names, please refer to the W3C official site.

Browser Preview

<p style="color: #0000ff;">This is a p element with 'color: #0000ff' specified.</p>

<p style="color: red;">This is a p element with 'color: red' specified.</p>

<p style="color: rgba(0, 0, 0, 0.6);">This is a p element with 'color: rgba(0, 0, 0, 0.6)' specified.</p>

Browser Support

Chrome Chrome
1+
Firefox Firefox
1+
Safari Safari
1+
Edge Edge
12+
Supported in all versions
IE IE
11
10
9
8
7
6
Opera Opera
3.5+
2 and earlier ×
iOS Safari iOS Safari
1+
Android Android Browser
4.4+
3 and earlier ×
Chrome Android Chrome Android
Latest
Same support as desktop
Firefox Android Firefox Android
Latest
Same support as desktop

※ Version data based on MDN.

Overview

Specifies the text color (font color). Color codes or color names can be used. For a list of available color names, please refer to the W3C official site.

Note that the RGBA color model is not supported in IE8 and earlier.

The 'color' property is also explained in this article.

If you find any errors or copyright issues, please .