The Official Register of Color Names

Blog

HEX Color Codes

HEX color codes

All web page designs, video games, photographs, or digital art must include colors, but there are hundreds of thousands of colors, and the creators must have a record of which colors were used. All color models such as RGB, HEX, or HSL play an essential role in the identification and composition of colors.

Next, we will explain a little more about the Hexadecimal model’s origin, what it is, and how it is used.

 

What is HEX?

Before defining the Hexadecimal system of colors, we must know a little about the composition of colors, how they are formed, and how they are identified.

First, the screens of a TV, monitor, or phone are made up of hundreds of pixels that display the colors necessary to form an image. However, each of these pixels is made up of 3 smaller pixels of red, one green, and one blue light. If these three small pixels’ illumination is modified, millions of different colors can be obtained using the “Additive color mixing” method.

If we consider the above explained, the Hexadecimal color system consists of creating a code for each of the colors created with the ?Additive color mixing? model that the RGB system uses. Although this system is different from RGB, they keep the same base, and it is possible to convert a decimal value to hexadecimal, that is, from RGB to HEX.

Something significant that everyone should know is that the RGB model’s decimal system has a base from 0 to 9. However, the hexadecimal system has a base from 0 to 9 and the first six letters of the alphabet, in other words, 16 symbols.

HEX color wheel
Decimal
Hexadecimal
0
0
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
A
11
B
12
C
13
D
14
E
15
F

How to use the HEX color codes?

The basic structure of a HEX model system is very similar to RGB because these two forms include the intensity of the primary colors Red, Green, Blue, and the information can be obtained directly from that code. However, the HEX code has the advantage that it is much easier to memorize than the RGB code.

The HEX code is made up of a Hash (#) at the beginning and then a set of 3 pairs of numbers that show the impact of each primary color. An example of the HEX code could be the code # F391C5. Can be seen as follows # (Red: F3) (Green: 91) (Blue C5), and it is equivalent in RGB, which is (243; 145; 197).

We know that it can be quite confusing at first to work with a Hexadecimal system when you have worked with RGB (Decimal) for a long time, but in the following table, we show the equivalence between these models:

A curious fact about the HEX system is that in web design or graphic design, the acronym most used to identify this model is #RRGGBB, which is different from RGB. The letters RR indicate the value of the red, GG the value of the green, and BB the blue value.

More about HEX triplet you can read there.

color codes