Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

CSS: “color”: X is not a valid color 3 or 6 hexadecimals numbers.

The hexadecimal value for the color CSS property is not valid. It needs to have either 3 or 6 hexadecimal digits.

The color CSS property sets the foreground color value of an element’s text and text decorations, and sets the currentcolor value. currentcolor may be used as an indirect value on other properties and is the default for other color properties, such as border-color.

This property accepts colors in different formats, one of them being hexadecimal values. For example a pure red color can be expressed either with 3 hexadecimal digits or 6 hexadecimal digits:

color: #F00;
color: #FF0000;

Learn more:

Related W3C validator issues