Last active
December 11, 2015 05:48
-
-
Save thachhoang/4554465 to your computer and use it in GitHub Desktop.
Random hex color code generator.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var color='#'+(Math.random()*0xFFFFFF<<0).toString(16); | |
// by nlogax | |
// http://paulirish.com/2009/random-hex-color-code-snippets/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bg_colour = Math.floor(Math.random()*16777215).toString(16) | |
bg_colour = "#"+("000000" + bg_colour).slice(-6) | |
document.bgColor = bg_colour | |
// Matt Malin ([email protected]) | |
// http://randomcolour.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment