It may be helpful to consider colors in terms of Hue, Saturation and Value. Now you can consider different sampling functions in Hue and Value, for instance, to generate your colors. You might increment in Hue, for instance, then repeat at a different Value to get darker versions of the same colors. You could also offset your Hue at alternating Value locations to get additional variability in color. For best results, you probably want to alternate 'warm' and 'cool' colors (favor red vs. favor blue) during your sampling.
EDIT:
For a technical overview of Hue, see this article for conversions HSV <-> RGB. They're a bit awkward, as HSV is typically interpreted as a cone, with hue taken as the angle about the normal axis. It's constructed that way because once you reach V=0, Hue and Saturation are both undefined (basically, Black is Black; it has no hues; Gray colors (the vertical axis) also have no hue) For your purposes you can simply use the equations (see the sections "Hue and chroma" and "Converting to RGB").
Once you have the HSV conversions implemented, the simplest color sampling that varies purely in hue is to just take hue from 0 to 360/(N-1), where N is the number of samples. You can set Saturation and Value however you like; S=1 and V=1 will give you the brightest, most 'colorful' (saturated) colors. If you have too many points to simply sample in Hue, you can start combining this with changes in Value (for darker colors) or Saturation (for more desaturated, 'grayish' colors).