Created
June 8, 2019 07:59
-
-
Save Klustre/66781e81c76a2b129ddeb3e5b282ddad to your computer and use it in GitHub Desktop.
Generate Random RGB Value
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
/* | |
* Create a random RGB value. | |
* (c) 2009 Paul Irish, CCO License - http://creativecommons.org/publicdomain/zero/1.0/ | |
* https://www.paulirish.com/2009/random-hex-color-code-snippets/ | |
* @return {String} A random six-digit RGB hexcode | |
*/ | |
const getRandomRGB = function () { | |
return '#' + Math.floor(Math.random() * 16777215).toString(16) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment