Create torus with different colored segments

How can I create a torus and assign a color to each segment?

You could create the torus from scratch with a vertex structure that includes colour