1function generateRandomColor() {
2 var letters = '0123456789ABCDEF';
3 var color = '#';
4 for (var i = 0; i < 6; i++) {
5 color += letters[Math.floor(Math.random() * 16)];
6 }
7 return color;
8}
9
10var randomColor=generateRandomColor();//"#F10531"