Last active
February 27, 2019 18:43
-
-
Save Jberivera/fc5d9b51b91a11ecf6a7f7fe9118f816 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 generateHex() { | |
const min = 1118481; // parseInt('111111', 16) | |
const max = 16777215; // parseInt('FFFFFF', 16) | |
const randomColor = Math.floor(Math.random() * (max - min + 1)) + min; | |
return `#${randomColor.toString(16)}`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment