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,780 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