Created
June 24, 2014 04:41
-
-
Save klebba/0fc275d818462bbaf550 to your computer and use it in GitHub Desktop.
Random RGB + A
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
var randomRGBA: function(alpha) { | |
var r = function () { return Math.floor(Math.random()*256); ); | |
var a = alpha || 1; | |
return 'rgba(' + r() + ',' + r() + ',' + r() + ',' + a + ')'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment