Premium Only Content

CSS Color Values with Hex Code and RGB
The lecture introduces you to another way of specifying a color in CSS.
Previously you learned that you can specify the color name, like red, green, or blue. But there are other ways of defining a color value, like using the hex value or the rgb value.
The hexadecimal value (aka hex) is a value that ranges from 0 to 255 in base 10, but is written in base 16 ranging from 0 to ff. That's why it's called hexadecimal, because one digit can have 16 different characters. It goes from the usual 0 to 9, then after that is goes using the letters a through f.
For the specific case of color hex codes, there are usually six digits. The first two digits are the value for the Red. The middle two digits are the values for the Green. The last two digits are the value for the Blue. Hence the abbreviation RGB whenever you need to compose those three colors to build any one color. For CSS, the hex value is always prefixed with a hash or pound sign.
You can also specify color values using base-10 RGB by saying rgb followed by parentheses. Inside the parentheses you write the values for RGB, separated by a comma. For example, for the Red value, instead of writing ff in hexadecimal, you would write 255 in decimal.
To show the red color, simply use value 255 for Red, 0 for Green, and 0 for Blue.
To show the green color, simply use value 0 for Red, 255 for Green, and 0 for Blue.
To show the blue color, simply use value 0 for Red, 0 for Green, and 255 for Blue.
-
34:08
Bannons War Room
10 hours agoMEGYN KELLY: Jimmy Kimmel and Sore Cultural Losers, and Charlie Kirk's Spiritual Revival, w/ Bannon
90.2K91 -
59:27
NAG Podcast
11 hours agoBrandon Straka: BOLDTALK with Angela Belcamino
83.8K11 -
59:43
Sarah Westall
9 hours agoVietnam Shuts down 86 Million Bank Accounts, The Fourth Turning & more w/ Andy Schectman
64.2K17 -
1:17:51
Flyover Conservatives
16 hours agoMary Flynn O’Neill and Clay Clark: The Church Must Rise or America Falls | FOC Show
63.3K12 -
3:36:01
I_Came_With_Fire_Podcast
18 hours agoThe Global ANTIFA Connection You've Never Heard Of | The Israel Question
52.2K13 -
16:38
RTT: Guns & Gear
1 day ago $6.35 earnedExtar EP9 Review: The Best Budget 9mm PCC?
62.8K6 -
7:53
Rethinking the Dollar
19 hours agoMass Firings in Tech: The Real Agenda Behind 166,000 Cuts
65K18 -
1:02:28
BonginoReport
13 hours agoFeds Monitor Threats Ahead of Kirk Memorial - Nightly Scroll w/ Hayley Caronia (Ep.138)
270K156 -
55:51
Candace Show Podcast
12 hours agoWho Moved The Camera Right Above Charlie's Head? | Candace Ep 239
128K682 -
13:09:13
LFA TV
1 day agoBREAKING NEWS ON LFA TV! | FRIDAY 9/19/25
268K56