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

CSS

Hexadecimal Codes

I am having trouble trying to guess colors with the hexadecimal code. For example, I don't understand why yellow is #ffff00. I think in my mind, I am picturing mixing red + green which would be purple. Help would be much appreciated!

4 Answers

James Barnett
James Barnett
39,199 Points

I'm not sure but, I think you are confused because of the differences between additive color (computer monitors) and subtractive color (painting/printing).

Check out the Wikipedia article on color mixing and then this most excellent introduction to color on the web.

Thanks for your advice. I will check out the links now!

There are also web sites that will let you choose a color and then give you the corresponding hexadecimal code. I can't remember which one I've been using, but it was one of the top results on Google.

Thanks, I will check it out!

Wayne Priestley
Wayne Priestley
19,579 Points

There are a lot of apps that will let you choose a colour and then give you the hex code for that colour. Are you using a Mac or PC?

I am using a Mac

Wayne Priestley
Wayne Priestley
19,579 Points

I use color calculator I think it was about £3, but it gives me hex, rgb and a load more values. You can also use it to grab a colour from your screen and get the value of it.