W3C color names

Updated: 02/04/2024 by Computer Hope
W3C color names

W3C color names are names assigned by the W3C (World Wide Web Consortium) to specify colors in web pages or files. These names are 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.

Note

Computer Hope lists hundreds of generic color names on its color codes pages. These generic names are not W3C color names.

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 following code

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

gives the following result.

Example of Red text and SlateBlue text.

Tip

These names could also be used in 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.

Note

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 name, Color terms, HTML, Web, Web design terms