Skip to content

Instantly share code, notes, and snippets.

@damouse
Created October 11, 2018 14:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save damouse/76e50997c6b711ac4f53c905df07c092 to your computer and use it in GitHub Desktop.
"""
Print out the ANSI color codes for testing.
"""
import sys
for i in range(0, 16):
for j in range(0, 16):
code = str(i * 16 + j)
sys.stdout.write(u"\u001b[38;5;" + code + "m " + code.ljust(4))
print(u"\u001b[0m")
print(u"I like 15: \u001b[38;5;22m which is me \u001b[0m and not this")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment