Examples of conversion

RGB to Hex

To change the color saved in the RGB system to Hex system, the following steps must be taken:

For example:
the color saved as RGB 252,58,108 we replace
R = 25210 = FC16
G = 5810 = 3A16
B = 10810 = 6C16
This means that the color saved in the Hex system is: #FC3A6C

Hex to RGB

In this case, we proceed as follows:

For example:
the color saved as Hex #51C563 we replace
5116 = 8110 = R
C516 = 19710 = G
6316 = 9910 = B

This means that the color saved in the RGB system is: 81,197,99