Does anyone have a good understanding of hex codes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Does anyone have a good understanding of hex codes?

I understand them in a limited sense. RGB and the digits 1 to F but how can pink equal FFC0CB when pink is red and white mixed? Shouldn’t it just be a muted version of red so like 990000? Whoever has mastered this, please help. I’m dying to know... Thanx

21st May 2020, 6:28 PM
madeline
madeline - avatar
6 Answers
+ 5
Think of it as three numbers with a value of 0-255 for each color. The higher the number the more of that color in the mix. Break the hex into three groups from left to right where each group pertains to the corresponding color of RGB (red, green, blue). So FFC0CB is FF for Red, C0 for Green, and CB for Blue. FF is equal to 255, 00 is equal to 0. You can calculate the values for each hex group and get its value.
21st May 2020, 6:50 PM
ChaoticDawg
ChaoticDawg - avatar
+ 2
Normally to make the color pink you'd mix white FFFFFF with red FF0000. White is made from all colors where black is the absence of color. So you mix in some of the other available colors (G & B) in order to get pink. You obviously can't mix in the max of G & B or you'd have white. Most, including myself, don't worry too much about the mathematics behind the "mixtures" but instead just use a color picker and go from there.
21st May 2020, 7:05 PM
ChaoticDawg
ChaoticDawg - avatar
+ 2
thanks. it is way too tough for me to understand the color thing because i think that is a physics question and not a coding one. 😖
21st May 2020, 7:06 PM
madeline
madeline - avatar
+ 1
madeline,hi but as you said pink is mixture of white and red, the white value is made of the three RGB --> all are 255 or fff in hex, so it make sense that other colors but red are still used in certain proportion. At least that's how I would explain.
21st May 2020, 7:09 PM
EmmanueLZ.
EmmanueLZ. - avatar
0
but i dont understand why pink has green and blue in it. maybe too high for my understanding 🙁
21st May 2020, 6:52 PM
madeline
madeline - avatar
0
hi, yes red and blue make pink so i guess it makes sense
21st May 2020, 7:15 PM
madeline
madeline - avatar