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 How to Make a Website Customizing Colors and Fonts Use Classes in CSS

Ryan B.
Ryan B.
3,236 Points

I'm struggling with understanding which color a certain set of numbers is going to produce. For example, #32673f.

Can some simplify this even more for me. For some reason it is not sticking. What makes #32673f dark green? Thanks in advance.

-Ryan

4 Answers

Ethan Lowry
PLUS
Ethan Lowry
Courses Plus Student 7,323 Points

Hi Ryan,

First of all, you're not expected to (nor should you) memorise what colour codes makes what colours - no one does, if people recognise them it's only through habit and lots of exposure. Most of the time you'll just be using colour pickers in your software of choice, or copying the colour code from somewhere else, or something along those lines.

But, if you're interested in what the numbers actually mean, here's a short version. In 'Hexadecimal' format, numbers are represented by any character from 0-9, or A-F, with 0 being the least, and F being the highest.

Colour codes come in the order you might have heard of: RGB (or Red, Green, Blue) - so a 6 character code has 2 characters each for those three colours. So the code #FFFFFF represents white, because this is the highest possible value for all 3 colours put together. On the other hand, #000000 represents black.

Any other combination of the 3 colours can yield whatever colour you imagine.

Hopefully that helps somewhat.

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

Just to add a little to the other answers. Ethan mention that each color of RGB is represented by 2 numbers in the 6 digit hexadecimal code. So red is represented by the first 2 numbers, G the middle 2 numbers, and B the last 2 numbers.

When you take a quick glance at a hex color, figure out which 2 number set is highest, and the color will be some version of that. So, looking at #32673f or Red 32 Green 67 and Blue 3f, Green is the highest, so it will turn out to be some type of green. Red and blue are fairly balanced, so they don't make it be more of a red-green or a blue-green.

The closer the three sets of numbers are to each other, the more gray the color will appear. So, if your hex was #55 67 55 , this would still be a bit green, but more grayed out.

To see this in action, check out this site. Put in one hex, then change some of the values and see how it changes your color.

This seems like a good easy place to check hex codes (or find some) if you don't have access to photoshop.

Ryan B.
Ryan B.
3,236 Points

Thank You! : )