can someone here explain me the HTML COLORS? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

can someone here explain me the HTML COLORS?

I didn't understand 00 FF and the others

7th Jun 2017, 9:29 PM
David Gedalia Ordman
David Gedalia Ordman - avatar
9 Answers
+ 18
ff is hexadecimal notation. A quick explanation of hex: 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f It's a 16-based number system instead of our traditional 10-based one. So a number, say "a", would be "10". We often write hex in uppercase, prepended with "0x" and in set-width format: 0x0A Hex came about as a convenient notation for 8 bit numbers (0-254 or 1-255). Colors traditionally comprise of Red Green Blue (RGB) values. Each value is 8 bits wide. The value for each RGB element is relationally how bright/concentrated that element is. We'll start with black. That's easy since all elements are off so to say: 00 00 00 or 000000 or 0x000000 Now let's make it red by adjusting the R element in our RGB: FF0000 That's veeeery red, 255 in fact. R=255, G=0, B=0. How about white? Remember white is all colors: FFFFF Now let's try grey. Like black and white, we'll need to do all RGB elements: 999999 Great. Try green. The green element: 00FF00 That's maximum green. By now you're wondering about yellow. I mean school taught you yellow was primary, but in this case it's not (complex, see Wikipedia). Yellow is red and green: FFFF00 and so on. I hope this clears it up. I've taken some liberties to simplify the explanation.
7th Jun 2017, 10:09 PM
Jamie
Jamie - avatar
+ 5
There are basically three ways to specify colors in html5 1. Using RGB HEX Code You'll specify six hexadecimal digits (0,1,...,9,A,B,...,F) preceded by # symbol E.g: #AA11FF In the above example the first two digits represents the red component R, the next two represents green component G, and the last two blue component B. The color intensity ranges from 00 to FF in increasing order of intensity. There is about 16 million possible colors in this RGB HEX code. In the abbreviated version of the hex code, the six hex digits were replaced with three digits. Hence narrowing the number of possible colors to mere 4000. Examples: Color RGB HEX Code Abbrv. Black #000000 #000 White #FFFFFF #FFF Red #FF0000 #F00 Green #00FF00 #0F0 Blue #0000FF #00F 2. Using RGB or RGBA Values This one is a bit similar with the first one, because of RGB color mixing involved. But in this case instead of hexadecimal digits 00 to FF, its equivalent decimal digits 0 to 255 was used, and the syntax differs. E.g: rgb(170,11,255) In this example the respective red, green and blue components, were represented by the first, second and third comma-separated numbers in the bracket. Examples: Color RGB Code Black rgb(0,0,0) White rgb(255,255,255) Red rgb(255,0,0) Green rgb(0,255,0) Blue rgb(0,0,255) An Alpha value ranging from 0.0 to 1.0 is often added to cater for the opacity in RGBA (the RGB extension), were 0.0 (transparent) and 1.0(opaque). E.g: rgba(218,112,214,0.95) is an opaque orchid color.
28th Jun 2017, 7:09 AM
Aminu
Aminu - avatar
+ 4
I can't really explain it though I understand it but I can refer you to this site... https://www.w3schools.com/html/html_colors.asp
7th Jun 2017, 9:43 PM
Raz
Raz - avatar
+ 4
thanks
7th Jun 2017, 9:47 PM
David Gedalia Ordman
David Gedalia Ordman - avatar
+ 2
@Jamie you're really a pro👏
7th Jun 2017, 10:36 PM
Raz
Raz - avatar
+ 2
3. Using HSL Values This one involves the use of Hue H, Saturation S and Lightness L properties. It also have its extension HSLA that includes Alpha value as discussed earlier. Hue: Is what people generally think of as color, it uses values in the color wheel ranging from 0 to 360 degrees. Saturation: Is the amount of gray in a color. Its values ranges from 0% (minimally saturated completely gray) to 100% (fully saturated without a trace of gray). Lightness: Is the amount of white or black. ranging from 0% (black) to 50% (normal color) upto 100% (white). E.g: Red color hsl(0,100%,50%) Yellow hsl(60,100%,50%) Remember you can add Alpha value for opacity e.g: hsla(300,90%,70%,0.7) You might also want to know complementary colors and tertiary colors concept, and also color schemes like split-complementary color scheme. Just learn color theory in general for a visually appealing design with awesome accessibilty. Accessible even to visually-impaired individuals :-) Check this site for more information 👉 http://beta.freecodecamp.com/en/
28th Jun 2017, 7:10 AM
Aminu
Aminu - avatar
+ 1
https://www.sololearn.com/Discuss/419276/?ref=app
7th Jun 2017, 9:42 PM
Rose Sevenyears
Rose  Sevenyears - avatar
+ 1
You can think of the html colors as 3 color sliders; Red, Blue, and Green. 00=bottom or smallest amount light, FF=top or highest amount of light. Therefore #000000 = #00(no red)00(no blue)00(no green) means NO light added (black) and therefore #FFFFFF means full light added (white). Colors using light (additive color model) are different than colors using ink or paint (subtractive color model). Since computer monitors project light we are using light to create html colors. A neat experiment is to play around with red, blue, and green light bulbs or 3 flashlights with colored filters on them. Red, blue, and green lights projected on the same area will create a white spot.
15th Jun 2017, 7:52 PM
Ken
+ 1
Colors are represented using rgb (red green blue) values, each randing from 0-255 (00-FF) For red,0 is darkest red, 255 is brightest red. For green, 0 is darkest green, 255 is brightest green. For blue, 0 is darkest blue, 255 is brightest blue. Just as we mix paints, we can mix them by determining how much of each color goes to the final color. So: rgb(0, 255, 0) or #00FF00 will represent full green. [0 in red, 255 in green, 0 in blue] rgb(25, 0, 0) or #1A0000 will represent a dark shade of red. [24 in red, 0 in green, 0 in blue] rbg(150, 150, 0) will represent a shade of yellow. [150 in red, 150 in green, 0 in blue] Knowledge of converting from decimals (base 10) to hexadecimals (base 16) will be useful here. Or alternatively, you can simply google something like: "purple in rgb and hex" And you'll get the color codes for that particular colour. //the post I posted this in is mfd so bah
25th Jul 2018, 1:57 AM
Andre Daniel
Andre Daniel - avatar