Created
June 19, 2016 19:25
-
-
Save bookercodes/01dc87388facf9e24230cfa7d87fab7f 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
const getRandomInt = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min | |
const getRandomPastelColor = () => { | |
const redHex = (getRandomInt(0, 128) + 127).toString(16) | |
const greenHex = (getRandomInt(0, 128) + 127).toString(16) | |
const blueHex = (getRandomInt(0, 128) + 127).toString(16) | |
return `#${redHex}${greenHex}${blueHex}` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment