Smart ways to make money online.

Smart ways to make money online - HTML Tutorial - Understanding Colors in HTML.

 

Colors can be expressed in two different ways in HTML. You can express them by using the name of the color or the 6-character hex value .

Hex values are used for generating colors other than the standard reds, blues, greens, yellows, purples, etc.

HTML doesn't understand colors like "sky blue" or "pea green" so if you want these kinds of colors, you need to specify a hex value.

Understanding hex values is easy if you can grasp the basics. Just remember that the individual colors you will mix are always red, green, and blue and always in that order.

So with the 6-character hex code the first two characters represent the amount of red, the second two characters represent the amount of green, and the last two represent the amount of blue.
Take a look at the chart below for the percentage breakdown.

0% = 00 60% = 99

20% = 33 80% = cc

40% = 66 100% = ff

So the hex color of ff3333 means 100% of red (ff), 20% of green (33) and 20% of blue (33).

So you'd use <font color="#ff3333"> to specify this color on your page.

If you wanted all white then the hex color would be ffffff

If you wanted a color that was mostly blue with a hint of red and green you could use the hex code of 3333ff (20% of red, 20% of green and 100% of blue)

 

Lesson # 4 : HTML Tutorial - Assigning Link Colors

HOMEPAGE