Created
August 12, 2013 22:49
-
-
Save m4r00p/6216084 to your computer and use it in GitHub Desktop.
Converts hex color value to rgb array.
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 hex2rgb = function (hex) { | |
return hex.match(/(\w{2})/gi).map(function(n){return parseInt(n,16);}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment