Friday September 22 marked the Autumnal, or Fall Equinox, and for the Northern hemisphere, that means the beginning of fall. Along with the onset of pumpkin spice everything, fall is also known for the beautiful color changing of the leaves. But why exactly does this happen? We’re so happy you asked.

Newsweek spoke with Dr. Dennis Stevenson, Vice President for Botanical Research and Cullman Curator at the New York Botanical Garden in New York City to get a better idea of this breathtaking phenomenon. According to Stevenson, unlike most living things that gain energy through food, trees get their energy from sunlight. Chlorophyll, a chemical inside leaves, converts this sunlight into energy for the trees through a process called photosynthesis. However, during the equinox there is far less sunlight than usual, which means less energy for the trees. Stevenson explains that this shift in sunlight is the main reason behind why the leaves fall in autumn.

Related: Fall Equinox 2017: When it is and what dose it mean?

“The trees are getting ready for winter, which means shorter days and very cold weather,” said Stevenson. “Normally, the trees are not able to go through photosynthesis to maintain themselves, plus they have to deal with the risk of their leaves freezing. The simplest way to deal with this is to get rid of their leaves.”

Okay, this explains why the leaves fall off, but what about the color changes?

Chlorophyll is also what gives leaves their bright green coloring. Stevenson explains that most of the leaf colors we see in fall come about from the loss of chlorophyll. In preparation for the dark winter months, trees stop making as much chlorophyll, once again in an effort to conserve energy.

Related: As fall equinox approaches, was Stonehenge used to predict astronomical events?

“The normal greens change into reds as the plants lose chlorophyll,” said Stevenson. “Take away the chlorophyll and other pigments such as yellows, reds, and other various shades can be seen.”

Some strange factors can affects how and when the leaves change colors. For example, according to Stevenson, temperature has an effect on the changing of the leaves. Warmer or cooler seasons can yield different colors. “If it stays a little warmer but dry, you have less vivid colors than a cooler dry fall may have.”

The presence of unnatural light can also affect a tree’s leaf color. A plant situated underneath a street light may not change its colors in the same way as one in nature would.

Ultimately, the changing of the leaves is a natural part of the season shift, and a way for trees to survive during the cold dark winter. Most importantly this fire-like performance from nature is a reason to go outside for a long autumn walk—before it’s over and you have to wait until next year.