Skip to content

RGB color

The RGB color is a combination of Red, Green and Blue colors: (R, G, B)

The red, green and blue use 8 bits each, which have integer values from 0 to 255.

So the number of colors that can be generated is: 2^24^ = 16,777,216.

Hex color code

A hex color code is a hexadecimal way to represent a color in RGB format by combining three values – the amounts of red, green and blue in a particular shade of color.

These hex color codes have been an integral part of HTML for web design, and remain a key way of representing color formats digitally.

Hex color code is a 6 digits hexadecimal(base 16) number: RRGGBB16

The 2 left digits represent the red color.

The 2 middle digits represent the green color.

The 2 right digits represent the blue color.

See also