Created
July 6, 2015 19:56
-
-
Save trevorgreenleaf/ea489e253698048381e9 to your computer and use it in GitHub Desktop.
HEX to RGB PHP
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
/** | |
* @return an array of rgb values | |
*/ | |
protected function hex2rgb($hex = null ){ | |
return sscanf($hex, "#%02x%02x%02x"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment