Skip to content

Instantly share code, notes, and snippets.

@dooyeoung
Created June 26, 2019 01:16
Show Gist options
  • Save dooyeoung/7a2e2bab4d00dd3940ff4ff41f6ed47e to your computer and use it in GitHub Desktop.
Save dooyeoung/7a2e2bab4d00dd3940ff4ff41f6ed47e to your computer and use it in GitHub Desktop.
hex to rgb
def hex2rgb(hexcode):
hexcode = hexcode.lstrip('#')
lv = len(hexcode)
return list(int(hexcode[i:i + lv // 3], 16) for i in range(0, lv, lv // 3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment