Just generate a number in JavaScript or your server side language of choice.
You could do it in JavaScript...
var color = "#" + Math.floor(Math.random() * 0xFFFFFF).toString(16);
...or PHP...
$color = "#" . dechex(rand(0, 0xFFFFFF));
Your comment...
Instead of using completely random colors, is there a way I could declare a number and then have it randomly choose from them?
Yes, for example...
$colors = array("#000", "#fff");
$randomColor = $colors[array_rand($colors)];