Created
June 20, 2019 05:03
-
-
Save iamskok/30646255936e6d1d118484416afc4466 to your computer and use it in GitHub Desktop.
Random HEX color 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
function randomHex() { | |
const hexMax = 256 * 256 * 256; | |
return '#' + Math.floor(Math.random() * hexMax).toString(16).toUpperCase().padStart(6, '0'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment