Anthocyanins

Plants utilize color in many ways. Their colorful flowers attract pollinators, while vivid fruit entice hungry animals, which distribute their seeds. Photosynthesis relies on colorful pigments, especially green chlorophylls, to manufacture food using energy from the sun. The colors we see are largely the result of pigments held in the leaves and other tissues. These chemical compounds reflect and absorb different wavelengths of light, appearing the color that they reflect. Thus, plants look green because they reflect most green light, whilst absorbing most red and blue. 

Photos 1 - 3: Acer palmatum 'Atrosanguineum', Corylus maxima 'Atropurpurea Superba', Persea thunbergii.

Several different groups of compounds are responsible for plant color. Chlorophylls are the green pigments that enable photosynthesis. Carotenoids are yellow, orange and red, and they have a smaller role in photosynthesis, whilst also providing color for some flowers, fruits, and carrots. Anthocyanins are red, purple, and blue and provide color in fruits, flowers, and leaves. Most plants contain all three of these different types of pigment.

Anthocyanins are the source of most red and purple colors in leaves, including in fall coloration. These chemicals may deter herbivores and can also protect plants from extreme temperatures, as when tomato leaves turn purple when exposed to cold. Anthocyanins protect leaves from damage due to ultraviolet radiation, which may explain why immature leaves of some evergreens flush red e.g. Pieris, and why some leaves turn red when exposed to more sun. Plant breeders have developed cultivars with red and purple foliage by selectively breeding those individuals with increased anthocyanin levels.