Is there any trick to learn hexa-decimal color code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is there any trick to learn hexa-decimal color code?

3rd May 2018, 1:27 PM
Sachin Bhatt
Sachin Bhatt - avatar
4 Answers
+ 2
Hexadecimals work like RGB, but a little different. Imagine this: #ffffff=white rgb(225,225,225)=white there's a bunch of multiplication things, too. let's use #123456 for simplicity. 12 are the red values, 34 are green, and we have 56 for our blue. To make white, we need all of them at the max. 1=1, 2=2, and 3=3, but then we hit 9, the highest number. what now? a=10, b=11, c=13, and eventually, f=15. 15*15=225, or 100%red, so making all of the digits f, we get 225r,225g, and 225b, or white. all 0 in rgb is black. #00(0red)00(0green)00(0blue) is black, or 0 of colours. Just multiply your values to get your numbers. Also, there can be just 3 digits, as 0f0, or something like that. It's the same thing, but less math.
3rd May 2018, 1:37 PM
What was my name again?
What was my name again? - avatar
+ 1
So, to learn, break it into 3 pairs, one for red, one green, and one blue. Multiply numbers to get what you need. Don't forget, 0 is still there. It's more simply put as first digit * 16^0, second * 16^1. Then repeat for the next values.
3rd May 2018, 1:50 PM
What was my name again?
What was my name again? - avatar
0
thank you
3rd May 2018, 1:47 PM
Sachin Bhatt
Sachin Bhatt - avatar
0
No problem!
14th May 2018, 1:59 PM
What was my name again?
What was my name again? - avatar