The hex code is a representation of the color in hexadecimal format. Hexadecimal is a base-16 number system that uses the numbers 0 to 9 and the letters A to F to represent values. The hex code is also known as HTML color code. All colors available in HTML have a corresponding hex color code. The hex code for the color blue is #0000ff. The hex color code for the color red is #ff0000.