Skip to content

Instantly share code, notes, and snippets.

@Tolsi
Created June 28, 2023 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tolsi/a158ecf2f9f1a0879530ba64d2ff6f5f to your computer and use it in GitHub Desktop.
Save Tolsi/a158ecf2f9f1a0879530ba64d2ff6f5f to your computer and use it in GitHub Desktop.
HEX to RGB floats for TouchDesigner
h = input('Enter hex: ').lstrip('#')
print('RGB =', tuple(int(h[i:i+2], 16)/255 for i in (0, 2, 4)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment