1 function getRandomColor() {
2 var letters = '0123456789ABCDEF'.split('');
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