The green leaf colour comes from pigments of chlorophyll, used by the trees to make food with the help of sunlight. There are other pigments namely carotenoids and anthocyanins present in the leaves, but are overshadowed by the chlorophyll in the spring and summer.
Now the carotenoid in the leaves show through and the leaves become a bright cascade of various shades of glowing yellows.
Anthocyanins impart red colour to fruits like cranberries, red apples, cherries, strawberries, etc.
The fall season being characterised by short days and longer and cooler nights. When a number of warm, sunny autumn days and cool but not freezing nights come one after the other, Maple leaves produce lots of sugar, but the cool night temperatures prevent the sugar sap from flowing through the leaf veins and down into the branches and trunk.
Anthocyanins are now produced by the leaves for protection. They allow the plant to move down the nutrients in the leaves to the roots, before they fall off. The nutrients stored in the roots help the trees to sprout out their leaves in the coming spring. During this time, anthocyanins give leaves their bright, brilliant shades of red, purple and crimson.