Created
August 8, 2014 11:29
-
-
Save lelinhtinh/0dcba315451cc4206a8b to your computer and use it in GitHub Desktop.
Tạo mã màu Hex ngẫu nhiên trong javascript
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
// http://www.paulirish.com/2009/random-hex-color-code-snippets/ | |
(function(m, s, c) { | |
return (c ? arguments.callee(m, s, c - 1) : '#') + s[m.floor(m.random() * s.length)] | |
})(Math, '0123456789ABCDEF', 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment