Usefull: Random Color

had nothin to do, so i thought i should share sommin with you guys :slight_smile:


function randomColor() {
	hexcode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
	ranColor = "0x";
	for (i=0; i<6; i++) {
		randomhexcode = hexcode[(random(hexcode.length))];
		ranColor += randomhexcode;
	}
	return (ranColor);
}

it returns an random hex color code :slight_smile: something like:

0x000000 <black

feel free to use it ! :slight_smile:

Not too shabby.

On the account if anyone wnats a true random color right there ya go :wink:

Here is another way:

http://www.kirupa.com/developer/actionscript/tricks/randomcolor.asp