I’d like to add that with render layers, you can pipeline the rendering using different color palettes.
The trunk is mapped to the purple palette and the leaves are mapped to the green palette, then summed together. This helps to fasten up the post-effects process.