(WHTM) — You probably wonder, but never researched, why the sky is blue and a color such as purple or green. It doesn’t have anything to do with the oceans or anything on Earth, but it has to do with light itself.

According to the National Oceanic and Atmospheric Administration (NOAA), it has to do with gasses and particles surrounding the Earth.

The white light that comes from the sun is all the colors of a rainbow combined. When the white sunlight enters the earth’s atmosphere, the red, yellow, and green wavelengths pass straight through the atmosphere to our eyes. NOAA says that the blue and violet waves are just the right size to bounce off the modules of gas in the atmosphere.

When the waves bounce off the molecules of the atmosphere, the waves get spread in all directions and scatter away from the other color wavelengths. Those other color wavelengths still stay mixed together when they reach the earth’s surface, so they still appear as white.

NOAA says that as you look at the sky where it meets the horizon, the color of the sky turns to a more white color. This is because molecules of gas have rescattered the blue light in so many directions so many times that less blue light reaches us.

Maybe you will look at the sky in a different way now that you know why it is blue!