CSS

33 lessons

Achievements
Combined Shape@2x

The Certificate

avatar

HEX color values

By far the most commonly used method of defining color is the Hex (short for Hexadecimal) color declaration.

The hexadecimal format for colors uses hexadecimal digits for indicating components of red, green, and blue.

hex color values css

Hex represent colors using a six-digit code, preceded by a hash character, like #rrggbb, in which rr, gg, and bb represents the red, green and blue component of the color respectively.

The value of each component can vary from 00 (no color) and FF (full color) in hexadecimal notation, or 0 and 255 in decimal equivalent notation. Thus #ffffff represents white color and #000000 represents black color.