- 720p
- 540p
- 360p
- 0.50x
- 0.75x
- 1.00x
- 1.25x
- 1.50x
- 1.75x
- 2.00x
We hope you enjoyed this lesson.
Cool lesson, huh? Share it with your friends
About this lesson
Quick reference
Colors
There are three main ways to use color in CSS.
When to use
Any time you want to use colors in your CSS, you'll use one of these three ways.
Instructions
The first way to use color in CSS is to just name the color. Like red. Or blue. Or whatever.
That's not a very good way because you can't really use different shades of colors.
Instead, use either hex color codes, or RGB color codes (hint: use hex).
Hex color codes look like this:
#cccccc;
You can find the codes for the color you want by using a hex color code picker website.
RGB color codes look like this:
rgb(255,0,0)
The first number is your red number, the second number is your green number, and the third number is your blue number.
Like hex color codes, find RGB codes with a color picker website.
You'll always want to use Hex codes over RGB codes.
Hints & tips
- There are 3 ways to use color in CSS.
1. Name the color, like red.
2. Use RGB values, like rgb(255,0,0).
3. Use hex color codes like #cccccc.
- Always use hex, it's the standard method
Lesson notes are only available for subscribers.