Update: A color picker w/Degrafa's built in palettes here
Someone on Flex Coders asked how to generate a series of random colors, and at the same time omit certain shades. I recently had a similar requirement. I used HSB color values to generate the distinct colors, and then converted them to the RGB values that we know and love.
Working w/HSB is more intuitive than RGB
Take a look at the ColorJack color sphere. Hue is an angle from 0 to 360, representing a color. At angle 0, the color is red. This just seems more intuitive than knowing how to combine varying amounts of red, green, and blue.
"Saturation" and "Balance" (or somtimes Brightness?) are also very intuitive. As saturation goes to zero, the color becomes more light. As balance goes to zero, the color becomes more dark. My description is not very scientific, but that's also my point.
I needed to generate a large number of fairly distinct colors. My approach was to rotate around the 360 degrees of hues, and vary saturation and brightness. I used this code to convert the HSB color to RGB.
Once you generate the colors, you can retrieve them as an array. Or, you can associate a color with a key name and retrieve it as needed.
// generate 100 colors var cm:ColorManager = new ColorManager(100); // configure optional properties cm.initialHue = 180; // start at hue angle of 180 // generate colors cm.generateColors(); // retrieve as array var a:Array = cm.colors; // assign/retrieve a key's color just by asking for it trace( _cm.getColorFor("foo") ); // now the key 'foo' is assigned a color // if you want it later, ask for it // with cm.getColorFor("foo")