Skip to content

Instantly share code, notes, and snippets.

@omkz
Created October 28, 2012 15:29
Show Gist options
  • Select an option

  • Save omkz/3968909 to your computer and use it in GitHub Desktop.

Select an option

Save omkz/3968909 to your computer and use it in GitHub Desktop.
Converting hex color to RGB
A hex value is just RGB numbers represented in hexadecimal. So you just have to take each pair of hex digits and convert them to decimal.
Example:
#FF6400 = RGB(0xFF, 0x64, 0x00) = RGB(255, 100, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment