posted 22 years ago
Hi Annette,
The closest I've gotten to this is setting up an array of colours and cycling through them over and over. Though this isn't random, I suppose you could repeatedly generate a random number between 0 and the number of colours in the array to choose a colour at random.
I haven't tried to generate customised colours, but looking at the constructors in the Color class, it looks like you can feed in your own (randomly generated )numbers to make a colour. For generating random numbers, there's the Random class, and Math.random.
Constructor example from Color API
~~~~~~~~~
Color(int r, int g, int b, int a)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).
~~~~~~~~~
cheerio
rowan