In this article, I will show you how the color wheel converts RGB colors into hex code, If you are not familiar with the color wheel then be aware that the color wheel is a visual representation of the color scheme based on their chromatic relationship.
If you look at the following color wheel, you will see how the colors are arranged according to the relationship between them.

In the image above you can see the colors organized more closely and you don't need to know the name of the color but you can touch the color you want and apply it in your work.

The color wheel is most helpful in color choices especially in the areas of graphics design, app and web development. But it also saves you time as you won't need to know the name of the color or do the calculations to change the color from the name to hex code, since hex code is more preferred by a professional developer.

Most modern text editors have a color wheel compared to the older ones, for example, Bracket text editor. But some editors have the ability to receive a color wheel package (sometimes a color picker) for example the Atom text editor requires a color picker package to make the task of color selection easy.

Understand the key concept first

RGB color is the three colors, red, green and blue, and can be mixed together to get other colors. They are written in decimal numbering format and the highest number is 255 while the lowest one is 0, it starts with the word rgb then the parentheses and inside the parentheses, there are three digits separated by a comma, for example, rgb (255,0,0); this is red color.

Hex code is a color format that consists of a combination of letters and numbers, sometimes occurring with numbers or letters only and is usually 3 or 6 and must start with a #, for example #fff. # 000, #ffffff, #000000. #000fff, or #bc2acc.

Hex is a hexadecimal abbreviation, it consists of a sequence of numbers and letters that is 16 in total
{0 1 2 3 4 5 6 7 8 9 A B C D E F}, in normal definition Hex, represents a number with a base of 16.

N = (16 x n) + r.
N is the number found within the RGB function.
n is a number that is multiplied by 16, so the answer is N or it comes close to N.
r is a reminder.

Problem 1: convert red color to hex code.
solution: red color in rgb format is written as rgb(255, 0, 0);

Recall, N = (16 x n) + r.
Step 1 take 255 replace,  255=(16 x n)+r  = (16 x 15) + 15       
Step 2 take n and r which are 15 and 15 as respectively.
Step 3 compare them with hex by counting as follows.
{0 1 2 3 4 5 6 7 8 9  A  B   C  D  E  F} this is hex.
{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15} this is count
here 15 = F and 15= F
So that 255 = FF,

Repeat the previous steps for the zero remained in rgb (255, 0, 0); i.e, 0 = (16 x 0)+0, and further you will get 00, 00.
Therefore the hex code of rgb (255, 0, 0) is # FF0000.

Problem 2: Convert cadet blue into hex code.
Solution: Please follow the previous steps, cadet blue is written as rgb(94,156,165);
Recall, N = (16 x n) + r.

94 = (16 x n) + r.= (16 x 5) + 14, take 5 and 14 go and compare you'll get 5and E
156 = (16 x n) + r.= (16 x 9) + 12, take 9 and 12 go and compare you'll get 9 and C
165 = (16 x n) + r.= (16 x 10) + 5, take 10 and 5 go and compare you'll get Aand 5

Therefore the hex code of rgb(94,156,165); is #5E9CA5.

This is how color wheel converts rgb color into hex code.

0 Maoni