A hexadecimal (hex) color code is a format for expressing colors in HTML and XML in the form of a six hexadecimal digits (6-6-6) number in the form #RRGGBB.
Hexadecimal and octal color codes are used to represent colors in computer graphics. Hexadecimal is used widely in HTML to specify color values in web pages. The color code is used to specify the exact color you want. Each color in the code is specified by a pair of digits (0-9 a-f) representing the intensity of each of the red, green, and blue components of the color.
For example, the hexadecimal code for pure white is #FFFFFF, and the hexadecimal code for pure black is #000000.