The sunlight we see each day, called “white light,” may appear colorless, but it is actually full of a lot of colors mixed together. This is why you see a rainbow when you shine white light through a prism.
The prism separates the white light into each of its colors: red, orange, yellow, green, blue, indigo and violet.
Each of the colors is made up of its own wavelengths, kind of like a unique fingerprint. Red has the longest wavelength, violet has the shortest and all the other colors are somewhere in the middle.
When you look at an object, such as a yellow sunflower or a red wagon, the color you see is actually the color of light the object reflects to your eye. A yellow sunflower reflects yellow wavelengths while absorbing all the other colors. A red wagon, on the other hand, reflects red wavelengths.
So how does the air in the sky have a color? The Earth’s atmosphere is filled with gas molecules. As white light from the sun passes through the atmosphere, colors with longer wavelengths, such as red, orange and yellow, pass through.
Blue and violet wavelengths, on the other hand, are absorbed by the gas molecules and scattered across the sky. Your eye sees these reflected wavelengths as blue.
Of course, you’ve probably seen the sky turn brilliant shades of orange and red during a sunrise or sunset. When the sun is low near the horizon as it rises or sets, the wavelengths have farther to go in order to reach your eyes.
This causes the shorter blue wavelengths you see during the day to scatter even more, clearing the way for longer wavelengths like red and orange to reach your eyes.