Created
August 20, 2010 02:01
-
-
Save remy/539433 to your computer and use it in GitHub Desktop.
Random hex colour with correct padding for small colours
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(h){return '#000000'.substr(0,7-h.length)+h})((~~(Math.random()*(1<<24))).toString(16)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment