Created
July 26, 2015 12:47
-
-
Save walkermatt/7594cf5e82a70f2c3fd7 to your computer and use it in GitHub Desktop.
Hexidecimal colour to RGB
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 hexToRgb(hex) { | |
return 'rgb(' + hex.slice(1).match(/../g).map(c => parseInt(c, 16)) +')' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment