Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Customizing Colors and Fonts Write Hexadecimal Colors

Arum Mohee
Arum Mohee
1,288 Points

"set the colour of paragraphs to black using the hexadecimal value" i dont understand

a { text-decoration: none; }

wrapper {

max-width: 940px; margin: 0 auto; }

logo {

text-align: center; margin: 0; }

h1, h2 { color: #fff; }

css/main.css
a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
}

#logo {
  text-align: center;
  margin: 0;
}

h1, h2 {
  color: #fff;
}

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

You're doing great so far! You've already set h1 and h2 to white with hexadecimal. Now you just need paragraph in black with hexadecimal. Take a look:

p {
  color: #000;
}

fff is white. #000 is black :) Happy coding!

Konrad Pilch
Konrad Pilch
2,435 Points

Lol, I need to refresh :D i just got confused with the names xD

Konrad Pilch
Konrad Pilch
2,435 Points

Just to add. Jennifer wrote the code in shorthand. That means if it repeats all the way along, you can short it to half.

So a color black woudl be #000000, but we can short it to #000.

If we got a color thats #CR9324, it needs to have all 6digits.

Arum Mohee
Arum Mohee
1,288 Points

Thanks Jennifer Cordell, sorry for the late reply i was too busy revising for my GCSE'S

much appreciated again!

Konrad Pilch
Konrad Pilch
2,435 Points

I would totally recommend to rewatch the video how he explains it.

Short answer: HEX, in the code woudl stand rgb which means red, green and blue. These colors creates any color that we see on the screen. They make all the colors mixed. if you write rgba (alpha) then you can change their opacity.

I don't know if thats any good, i hope it is to some degree, but you should rewatch the video again. They explain it perfectly. If not, then ill get into more details.

And if im right, HEX = 6, so we have also a 6 digit color naming. Like #000000 for black. Like with Jennifer.

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

It's hex is the short word for hexadecimal... base 16. Where numbering starts from 0 and goes to 255 giving us a total of 256. Base 6 counting is known as "senary".

I'm going to use ^ here to denote "to the power of" because I can't seem to get superscript to work in markdown.

In the case of #FFFFFF what you have is three sets of numbers squished together. FF is equivalent to (16^0 * 15) + (16^1 * 15). When you add those together... you get 255. So it really does say 255 255 255 but in base 16. Just thought I'd make things even more confusing :P

Konrad Pilch
Konrad Pilch
2,435 Points

Yeah :D Didn't revise it for a while. Thank you :D I think im gonna need to watch some old treehouse vidoes just for pure revise :D

Tushar Singh
Tushar Singh
Courses Plus Student 8,692 Points

Go back to your videos and find your answer. just solving coding challenges won't help you really(just a suggestion).

Arum Mohee
Arum Mohee
1,288 Points

thank you sorry of the late reply Tushar Singh