51
A good way of generating a nice set of colours is to define them using fixed saturation and brightness and vary the hue.
This gives you a nice set of colours, which all look like they came from the same 'set' -- all pastel, or all intense, or all off-white, whatever. And it's pretty easy to code if you've got Color.FromHSV().
It probably stops working once you get too many colours though, they'll be indistinguishable. But you'll probably get that problem anyway.
In pseudo code:
Sat = 0.5 * 255 //assuming we want range 0-255...
Brightness = 0.9 * 255
NumberOfColours = 7
HueSeparation = 360 / 7
Colors = []
for (i = 0 ; i< NumberOfColours; i++)
Colors.Add(Color.FromHSV(HueSeparation * i, Sat, Brightness)
or
n = 7
Colors = [Color.FromHSV(x*360/n, 128, 230) for x in range(n)]
(I do like list comprehensions...)