Last active
September 15, 2017 19:35
-
-
Save SerpentChris/f7efa276cb00ed6047840487af396718 to your computer and use it in GitHub Desktop.
Makes a random 8bit RGB color code.
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 randomColor(){ | |
| var color = '' | |
| for(var i=0; i<3; i++) | |
| color += Math.floor(Math.random()*255).toString(16).padStart(2, '0') | |
| return color | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment