Skip to content

Instantly share code, notes, and snippets.

@ar5had
Last active December 3, 2016 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ar5had/6e8516b5d44fa2515519b2e23aed88c9 to your computer and use it in GitHub Desktop.
Save ar5had/6e8516b5d44fa2515519b2e23aed88c9 to your computer and use it in GitHub Desktop.
Random Color Generator
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++ ) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment