Created
December 27, 2018 11:42
-
-
Save avisek/c0ca3b9e5f726e0ccd92f9c2edadd172 to your computer and use it in GitHub Desktop.
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
function getRandomColor() { | |
var x = Math.round(0xffffff * Math.random()).toString(16); | |
var y = (6 - x.length); | |
var z = '000000'; | |
var z1 = z.substring(0, y); | |
return '#' + z1 + x; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment