Created
November 23, 2014 09:14
-
-
Save szmeku/d720d8e807ae8d0b4788 to your computer and use it in GitHub Desktop.
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
function getRGB(color){ | |
colorArray = color.split(''); | |
colorArray.shift(); | |
var rgb =[]; | |
while(colorArray.length){ | |
rgb.push(parseInt('0x'+colorArray.splice(0,2).join(''))); | |
} | |
return 'rgb('+rgb.join(', ')+ ')'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment