Several pigments are responsible for color in plants: chlorophyll, carotene, xanthophyll, and anthocyanins. Chlorophyll is the pigment in chloroplasts of plants that reflects green light. Plants use the energy absorbed by chlorophyll in photosynthesis to produce food for their growth and development.
During flowering, with the passing of summer, days become shorter. The phytochromes, the light-sensing mechanisms in leaves, recognize the shorter day lengths.
The molecules reflecting red wavelengths, anthocyanins, are water-soluble pigments that occur in the cell sap, creating the red, pink, and purple hues. These pigments may not be present during the summer, or vegetative cycle, but their formation is encouraged during a succession of cool nights and sunny days.
The first degree of natural purple in cannabis could be characterized as occurring exclusively in the leaves and petioles: the colors of autumn appearing in the fan leaves during cooler temperatures and close to harvest.
http://www.cannabisnews.org/growerscorner/how-to-change-plant-colour/
http://www.na.fs.fed.us/Spfo/pubs/misc/leaves/leaves.htm
check that out too..