Well... That explains yellow and orange. But why are some leaves red or purple?
Remember when we talked about the cells building a wall to cover over the tubes in the leaf's stem so the water couldn't get in anymore?
The sap in the trees uses the same tubes to carry the sugar around to feed the rest of the tree. When the wall covers the tubes, sometimes sugar gets trapped inside the leaf. This sugar may cause the sap to turn red or purple.
And this makes the leaves look red or purple!