0
HTML Colors Hex values
I do not get when the hashtag symbol (#) is followed by three hex characters? And when it is followed by six hex characters? I Also Would like to know if there is a specific rule for writing the Hex values?
3 ответов
+ 3
Hex are
Red
Green
Blue
For three digit, each single digit is for one color, from 0 to 15.
For six digit, each two digit is for two color, from 0 to 255.
You don't have to memorizes anything. Use an online HTML color picker, or the color picker built-in in a code editor.
+ 1
3 hex chars is a shorcut for 6 hex char with twice the same char at each color:
#f00 == #ff0000 == red
#9ac == #99aacc ...
0
I have a code which converts those values.
https://code.sololearn.com/c4X4zobmnjGa/?ref=app