Skip to content

Instantly share code, notes, and snippets.

@BenGardiner
Created May 26, 2017 04:17
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 BenGardiner/40b955b41e00737d3c4fbab82d09965f to your computer and use it in GitHub Desktop.
Save BenGardiner/40b955b41e00737d3c4fbab82d09965f to your computer and use it in GitHub Desktop.
get @cortesi's http://binvis.io byteclass pallete in @FireyFly's pixd -- export PIXD_COLORS="$(./cortesi-byteclass-pallete.py)"
#!/usr/bin/env python
import string
import sys
def getPoint(c):
if c == 0:
return [0, 0, 0]
elif c == 255:
return [255, 255, 255]
elif chr(c) in string.printable:
return [55, 126, 184]
return [228, 26, 28]
for i in range(0, 256):
triple = getPoint(i)
sys.stdout.write("%02X%02X%02X " % (triple[0], triple[1], triple[2]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment