The colors that now begin to emerge are actually present in the leaves all year long; they are pigments masked by the chlorophyll during the warmer months. The yellows of such species as birch, aspen and hickory are caused by carotene, the same pigment that gives color to corn, carrots and egg yolks. The autumn reds and maroons in sugar maples, sumac and other species derive from the pigment anthocyanin, formed from sugar compounds stored in the leaves. This chemical's effect on color depends on the acidity or alkalinity of the tree. Red maples, which are more acidic, turn red; ash trees, being alkaline, become purplish. ..."

This link is available if you'd like to read the entire article from the National Wildlife Federation.