Created
October 11, 2018 14:19
-
-
Save damouse/76e50997c6b711ac4f53c905df07c092 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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