0
0
CSSmarkup~5 mins

Hex colors in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a hex color code in CSS?
A hex color code is a way to represent colors using a 6-digit combination of numbers and letters starting with #. It shows the amount of red, green, and blue in the color.
Click to reveal answer
beginner
How do you write pure red using a hex color code?
Pure red is written as #FF0000. The first two digits (FF) are red, the next two (00) green, and the last two (00) blue.
Click to reveal answer
beginner
What does the hex color #000000 represent?
It represents black. All colors are at zero intensity: red=00, green=00, blue=00.
Click to reveal answer
intermediate
Can hex colors use 3 digits instead of 6? How?
Yes. A 3-digit hex color like #F0A is a shortcut for #FF00AA. Each digit is doubled to make the full 6-digit code.
Click to reveal answer
beginner
Why are hex colors useful in web design?
They are easy to write, widely supported, and let you pick exact colors by mixing red, green, and blue values.
Click to reveal answer
What does the hex color #00FF00 represent?
AGreen
BBlue
CRed
DBlack
Which hex code is the shorthand for #112233?
A#112233
B#123
C#1233
DNo shorthand
What color does #FFFFFF represent?
AGray
BBlack
CYellow
DWhite
How many digits are in a full hex color code?
A3
B4
C6
D8
What does the first two digits in a hex color code represent?
ARed intensity
BGreen intensity
CBlue intensity
DOpacity
Explain how hex color codes represent colors in CSS.
Think about how red, green, and blue mix to make colors.
You got /4 concepts.
    Describe the difference between 3-digit and 6-digit hex color codes.
    Shorter codes save typing but mean the same color.
    You got /4 concepts.