Created
September 17, 2017 10:50
-
-
Save culttm/b514b37c8fd2b4dc55d8bd7da1ba449f to your computer and use it in GitHub Desktop.
getRandomColor
This file contains 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
getRandomColor() { | |
let letters = '0123456789ABCDEF'; | |
let color = '#'; | |
for (var i = 0; i < 6; i++) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment