## Booklet

# How Do HEX Color Codes Work?

HOW DO HEX COLOR CODES WORK?

So, how does

#4D84FF = ?

First, let's understand **RGB** (Red, Green, Blue).

A computer screen displays a color by combining red light, green light and blue light.

The six digits of a hex code are in fact **three** two-digit numbers, each representing the level of red, green and blue.

There are **256 possible shades of each** red, green, and blue (0 through 255).

The number 0 signifies no representation of the color and 255 signifies the highest possible concentration of the color.

Therefore...

**RGB (255, 0, 0)** = Pure red

**RGB (0, 255, 0)** = Pure green

**RGB (0, 0, 255)** = Pure blue

**RGB (255, 255, 255)** = Pure white

**RGB (0, 0, 0)** = Pure black

For other colors, you'll use a combination of these color values.

Now that you understand RGB, lets look at **hex codes**:

Values 0-9 are stated **numerically**.

Values 10-15 are represented by **letters**.

(A=10, B=11, etc)

Let's look back at this hex code: **#4d84ff**

To calculate the hexadecimal number for each of the three, follow these steps:

1. **Multiply the first number by 16**

2.** Multiple the second number by 1**

3. **Add these two digits together**

**#4D84FF = RGB(77, 132, 255) =**

Red

**4D**: (4*16) + (13*1) = **77**

Green

**84**: (8*16) + (4*1) = **132**

Blue

**FF**: (15*16) + (15*1) =** 255**

By understanding these values. we know the color will be skewed towards a heavy blue color.