Over a million developers have joined DZone.

CSS: Background-color

DZone's Guide to

CSS: Background-color

Free Resource
Saved source from http://phpforms.net/tutorial/tutorial.html

It is possible to make a color by 3 ways:
1. By the name.
Browsers support some colors by the names.
2. By the hexadecimal value
The numbers in hexadecimal code are used for colors specifying. This system opposite to the decimal one is based on the number 16 as you can see from its name. It uses the next symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. The numbers from 10 to 15 are substituted to the latin letters. In the decimal system the numbers after 15 are formed by integration of 2 numbers into 1. For example, number 255 fits number FF in hexadecimal system. For avoiding misunderstandings in defining the number language, the symbol # is set before the hexadecimal value, for example #666999. Each of three colors — red, green and blue can have the values from 00 to FF. Thus, color defining is divided in three components #rrggbb, where first 2 symbols mark red component of a color, 2 medium ones define green and two last ones define dark blue. It is allowed to use the abridged form like #rgb, where every symbol neededs to be doubled. So, it is necessary to consider the record #fe0 as #ffee00.
3. By RGB
It is possible to define a color using values of red, green and blue components in decimal calculation. Each value of three colors can have values from 0 to 255. It is also possible to set a color in a percentage ratio.
Also the element “transparent” determining a transparent background is available


Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}