JavaScript随机颜色

2016-12-06· 2394 次浏览
JavaScript生产随机颜色值 ``` var getRandomColor = function(){       return  '#' +         (function(color){         return (color +=  '0123456789abcdef'[Math.floor(Math.random()*16)])           && (color.length == 6) ?  color : arguments.callee(color);       })('');     } ```