Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Treehouse Club: CSS My First Web Page Color Keywords, Hex Colors, and Font Families

Different color shade?

html { border-top: 50px solid green; border-bottom: 50px solid green; background-color: white; }

There is my code in CSS. Why does the green at the bottom look noticeably lighter than the shade at the top?

2 Answers

I assure you it is the same! You are NOT going insane! lol

Perhaps your desktop background behind the browser is tricking your eye. There is a graphic design color theory that explains this phenomenon. (A color can trick the eye by appearing slightly lighter or darker on different backgrounds).


Example: http://images.gamedev.net/features/art/pixelart1/orangeBlock.gif

Ahh... somewhat similar to that whole "dress is black/blue vs white/gold" debate last year. What sneaky eyes we have!

Thanks for the response, John.


anil rahman
anil rahman
7,786 Points

It is based on the calibration of your monitor and to my knowledge there is no way to compensate for it in CSS.

To figure out how to calibrate your monitor so that at least you can see what is really happening with your color schemes visit a site like this one: