How can I understand html colors? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

How can I understand html colors?

26th May 2019, 11:12 PM
Joseph Mwangi
Joseph Mwangi - avatar
9 Antworten
+ 3
Do you mean the hex color codes (#FF00FF) ? Well, you first have to know how does the hexadecimal numbers work, they are like decimal number except that every digit can have 16 different values, from 0 to F. Every two digits are the intensity of a pixel color (Red, Green, Blue, in that order). If you write #FF0000 it will be an intense Red because the Red color is at max and Green and Blue intensities are at 0. Different combinations of those three primary colors can give millions of different colors.
26th May 2019, 11:21 PM
Andres0b0100
Andres0b0100 - avatar
+ 2
Thank you
26th May 2019, 11:20 PM
Joseph Mwangi
Joseph Mwangi - avatar
+ 2
Ok...but how comes #C1250F is mix of red and orange??
26th May 2019, 11:27 PM
Joseph Mwangi
Joseph Mwangi - avatar
+ 2
Orange is comb of red and yellow, and yellow is combof green and blue.. so intense red with medium green and blue is orange
26th May 2019, 11:29 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
Joseph Mwangi just like Andres0b0100 said, every two digits represent intensity of color, #000000 is black, #FFFFFF white, #FF0000 red..
26th May 2019, 11:37 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
How do hexadecimal work?
26th May 2019, 11:33 PM
Joseph Mwangi
Joseph Mwangi - avatar
+ 1
As I said, hexadecimal numbers have 16 posible values per digit, they are 0123456789ABCDEF. RGB colors use 2 hex digits per color, that's a number from 0 to 255 in decimal for each color and about 16 million from combinations of red green and blue.
26th May 2019, 11:39 PM
Andres0b0100
Andres0b0100 - avatar
0
I get it
26th May 2019, 11:40 PM
Joseph Mwangi
Joseph Mwangi - avatar
0
Btw, use the "best answer" mark to select the most useful/best answer (the green check icon)
26th May 2019, 11:44 PM
Andres0b0100
Andres0b0100 - avatar