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 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).

http://graphicdesign.stackexchange.com/questions/15494/how-to-make-a-color-appear-the-same-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.

https://en.wikipedia.org/wiki/The_dress_(viral_phenomenon)

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:

http://www.wikihow.com/Calibrate-Your-Monitor