Skip to content

Instantly share code, notes, and snippets.

@tonyc726
Created November 6, 2015 06:40
Show Gist options
  • Save tonyc726/22e29ba83717b8f13b38 to your computer and use it in GitHub Desktop.
Save tonyc726/22e29ba83717b8f13b38 to your computer and use it in GitHub Desktop.
JS随机生成颜色值
function color(){
return '#' + Math.floor(0x1000000 + Math.random() * 0x1000000).toString(16).slice(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment