Every screen is a made up of tiny pixels. Each pixel has a red, green, and blue light, which adds together to produce what your eyes see as a single color. Hex tells the computer how much of each light to use. It is a six digit code with three parts: one for red, green and blue.
The letters A through F are used to represent the letters 10–15 so that more than 99 values can be held in two digits.
For example, the first part of this hex code is E8, which is the red value. Each digit must be multiplied with 16 to the value of its place, since hex is a bas 16 system. So first we have 8 x 16 to the zero power. Next is E witch represents 14 x 16 to the first power. The sub of these numbers tell the computer how much red should be in this pixel. This process is continued until the computer knows exactly how much of each color light it needs in that pixel. This process is repeated every fraction of a second.