Autumn's yellows were in the leaves all summer, hidden by chlorophyll
When leaves turn in autumn, most of the yellow and orange is not new at all. Those pigments sat there all year, masked by green chlorophyll until it broke down. The reds are different: trees manufacture them fresh once about half the chlorophyll is gone. Colour in living things is chemistry doing a job.
A biological pigment is a substance made by an organism whose colour comes from absorbing some wavelengths of light and reflecting the rest. That sets it apart from structural colour, the shimmer of many butterfly wings, which shifts with viewing angle because it arises from layered microscopic structures rather than chemistry. Pigments such as melanin sit in specialised cells called chromatophores in skin, eyes, feathers and hair.
In plants the main job is photosynthesis. Chlorophyll soaks up blue and red light and reflects most of the green, which is why plants look green; land plants carry two forms, a and b, while red algae make do with only a. Carotenoids, the red, orange and yellow family, help harvest light, protect against damage from excess energy and give rise to the hormone abscisic acid. Lycopene colours tomatoes and lutein is the most abundant plant carotenoid. Anthocyanins, whose name means flower blue, shift from red to blue with acidity, while betalains, found only in a plant order that includes cacti and amaranth, give beets their deep red and never appear alongside anthocyanins. Colour changes in flowers can even tell pollinators which blooms still hold nectar.
Animals put pigment to many uses: camouflage, warning colours, mimicry and courtship. Fish, amphibians and cephalopods can alter their chromatophores to match a background or to signal to one another. Rhodopsin captures light as the first step in vision, and melanin can shield tissue from ultraviolet burns. Some colours are accidental, though: the heme that carries oxygen in blood is coloured by happenstance, not for display. Parrots have their own red and yellow pigments, psittacofulvins, and turacos carry unique red and green ones.
Carotenoids are the most widespread pigments in nature, with more than 600 known kinds. Most animals cannot make them and must eat them, which is why marine invertebrates depend on plants for theirs. The known exceptions are striking: pea aphids, two-spotted spider mites and gall midges carry carotenoid-making genes apparently picked up from fungi through horizontal gene transfer.
Source: Biological pigment