1function get_random_color()
2{
3 var color = "";
4 for(var i = 0; i < 3; i++) {
5 var sub = Math.floor(Math.random() * 256).toString(16);
6 color += (sub.length == 1 ? "0" + sub : sub);
7 }
8 return "#" + color;
9}
10
11function get_rand_color()
12{
13 var color = Math.floor(Math.random() * Math.pow(256, 3)).toString(16);
14 while(color.length < 6) {
15 color = "0" + color;
16 }
17 return "#" + color;
18}
19