W3C color names

Updated: 06/06/2021 by Computer Hope
W3C color names

W3C color names are names assigned by the W3C to specify colors in web pages or files. These names can be used instead of their corresponding hexadecimal value to refer to that color in an HTML (hypertext markup language) or CSS (cascading style sheets) file. These names are supported by all modern web browsers and used because it's easier to remember color names than color codes.

How to use W3C color names

Any of the W3C color names can be used as a substitution for an HTML color code. For example, if you wanted to use the color Red, type "Red" instead of "#FF00000" or use "SlateBlue" instead of "#6A5ACD."

Below is an example of how these colors could be used with the span tag to create colored text.

Using the above code gives the

Example of <span style="color:red">Red</span> text and <span style="color:slateblue">SlateBlue</span> text.</p>

following result.

Example of Red text and SlateBlue text.


These names could also be used within CSS, are not case-sensitive, and cannot contain a space.

List of W3C color names

The following is a complete list of W3C color names. Click any colored button to view more information.


Some colors have more than one W3C name. For example, #00FFFF is named "Aqua" and "Cyan." All variants of "Gray" have the alternate spelling of "Grey" that refers to the same color value.

Color terms, HTML, Web, Web design terms