Skip to content

Instantly share code, notes, and snippets.

@betawax
Last active December 28, 2015 14:29
Show Gist options
  • Save betawax/7514945 to your computer and use it in GitHub Desktop.
Save betawax/7514945 to your computer and use it in GitHub Desktop.
Convert a hexadecimal value to RGB
list($r, $g, $b) = sscanf($hex, '%02x%02x%02x');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment