Color
The color property allows you to specify the color of the web page elements.
Color theory
Every color on a computer screen is created by mixing amounts of red, green, and blue. To find the color you want, you can use a color picker.
Computer monitors are made up of thousands of tiny squares called pixels (if you look very closely at your monitor you should be able to see them).
When the screen is not turned on, it’s black because it’s not emitting any light. When it’s on, each pixel can be a different color, creating a picture.
The color of every pixel on the screen is expressed in terms of a mix of red, green, and blue — just like on a television screen.
You can specify any color in CSS in one of three way:
1 . rgb values.
These express colors in terms of how much red, green and blue are used to make it up. For example: rgb(100,100,90).
2 . hex codes.
These are six-digit codes that represent the amount of red, green and blue in a color, preceded by a pound or hash # sign. For example: #ee3e80
3 .color names.
There are 147 predefined color names that are recognized by browsers. For example: DarkCyan.
Background Color
You can specify your choice of background color in the same three ways you can specify foreground colors.