I want to create a pie with 12 slices, with each slice a different colour.
Pretty much every colour wheel seems to follow the same format; eg: http://www.tigercolor.com/color-lab/color-theory/color-theory-intro.htm .
But what algorithms are there for generating the colours? What is the math behind RGB(theta)? Surely there must be some established science on this, but Google is not giving me any clues.
Have a look at http://www.easyrgb.com it has the algorithms behind many color conversions. Here's the RGB -> HSV one.