Skip to content

Instantly share code, notes, and snippets.

@kujon
Created May 10, 2012 14:54
Show Gist options
  • Save kujon/2653680 to your computer and use it in GitHub Desktop.
Save kujon/2653680 to your computer and use it in GitHub Desktop.
JavaScript: one line color generator
'#' + (function(h){return new Array(7-h.length).join("0")+h})((Math.random()*0x1000000<<0).toString(16))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment