Created
November 4, 2016 17:45
-
-
Save u01jmg3/4dc700aa1450a376aa7bf6e5665775e9 to your computer and use it in GitHub Desktop.
Generate random HEX colours
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
var c = document.getElementsByTagName('canvas')[0]; | |
var x = c.getContext('2d'); | |
x.fillStyle = '#' + ('00000' + (Math.random() * (1 << 24) | 0).toString(16)).slice(-6); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment