Together, this phenomenon is called simultaneous contrast . What's happening is that your eye compares the colors surrounding the stars to the stars' colors when telling your brain what colors to perceive. And this phenomenon isn't the result of the colors themselves. If you carefully examine each star, you'll agree they're the same shade. But at a quick glance, they appear to be at least three different shades.
Simultaneous contrast can occur with color or grayscale images.
While not immediately obvious, the concept of simultaneous contrast can affect a Web designer in a number of ways. For instance, it's an important concept to remember if you're going to be placing light-colored text on a darker background. As you can see from the example shown in Figure C, the text in the black region appears thinner than the text in the white region. This again is due to simultaneous contrast. This is also an important factor to remember when you're developing a tight color scheme.