It's that time of year when we are amazed at the beautiful fall foliage around us. But what happens to the trees and the leaves that makes them turn such vibrant colors? 

During the spring and summer, leaves act like a factory. They make the food necessary for the growth and survival of the tree. Chlorophyll is the main player in that process, making the leaf look green. In fact, there is so much chlorophyll that it hides the other colors.

Inside of a leaf are other pigments that look yellow and orange, but a couple of things need to happen for these colors to be revealed.

The first is day length. In the fall, shorter days trigger the tree to stop making food. Leaves are sealed off from the branches, and any extra sugars are left behind.

Next, the cooler evenings tell the tree that winter is coming and it's time to protect itself and slow down. So it continues to seal off the leaves. It also helps turn the sugars left behind red and purple.

Finally, the sunshine does its job. Sunny skies burn off the chlorophyll faster than cloudy ones. As it disappears, the brilliant yellows, oranges, reds, and purples are revealed and we see our fall colors.

RELATED: As the leaves turn, it’s time to get out and explore Maine

RELATED: Scientists want your Acadia National Park photographs

RELATED: Find when fall colors will pop in Maine with autumn foliage prediction map

RELATED: MAINE FALL FOLIAGE | Interactive map shows when fall colors are expected to pop