Specifying Color

Now that you are familiar with CSS basics, including how to apply rules, cascading, and selectors, let’s start using it. The first major topic in CSS will focus on color, specifically how to specify colors for text and backgrounds.

There are three common ways of specifying color in CSS;

  • Color Names
  • RGB
  • Hex Values

They all work in practically the same way by specifying the amount of red, green, and blue that should be combined to make a color.

Each color has a possible range of 256 values, 0-255. Remember, in a 0-based system, ‘0’ counts as a value.