Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.34 KB

File metadata and controls

28 lines (20 loc) · 1.34 KB

Read: 07 - Design web pages with CSS

Color can really bring your pages to life So we need CSS to help us to make the page colorful and beautiful

css

Foreground Color

There are 3 ways to define colors

  • 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) ***
  • 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***
  • color names

    • There are 147 predefined color names that are recognized by browsers. *** For example:DarkCyan***

    color

    Background Color

CSS treats each HTML element as if it appears in a box, and the background-color property sets the color of the background for that box.

You can specify your choice of background color in the same three ways you can specify foreground colors:

  • RGB values
  • hex codes
  • color names

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.

rgb