The green comes from chlorophyll, the paint that catches sunlight and makes sugar from air and water. The yellow and orange sit in the leaf all year, covered by green. The red appears only in autumn, manufactured by the leaf at its own expense.
All summer the leaf is a kitchen. Chlorophyll, in abundance, gives the green colour and puts light to work. Beside it sit the yellow and orange pigments, the carotenes and xanthophylls, the same ones that colour the carrot. They stay invisible because the green covers them.
In autumn the leaf closes the kitchen and dismantles the chlorophyll. The green dies away and the yellow comes into view. At the same time, in some species, further reactions begin that manufacture red pigments, the anthocyanins. The mix of leftover green with yellow and red gives the russet, the purple and the bright orange.
Some trees show only yellow. Many oaks turn mostly brown. The brown comes from the mix and, after the cells die, from dark products of the oxidation of compounds called phenolics.
Conifers sit this game out: their needles stay green all year and fall only after two to four years or more.