Skip to content

Instantly share code, notes, and snippets.

@chuangzhu
Created August 28, 2018 15:30
Show Gist options
  • Save chuangzhu/611e80181a4381fdaaad7b1fcd074a2a to your computer and use it in GitHub Desktop.
Save chuangzhu/611e80181a4381fdaaad7b1fcd074a2a to your computer and use it in GitHub Desktop.
Shell color cheatsheet.
#!/usr/bin/python
from __future__ import print_function
print()
for i in range(0, 10):
print(i, end=' ')
print('\033[{}m'.format(i), end='')
print('AaBbCcDdEeFfGg', end='')
print('\033[0m')
print()
for i in range(30, 40):
print(i, end=' ')
print('\033[{}m'.format(i), end='')
print('AaBbCcDdEeFfGg', end='')
print('\033[0m')
print()
for i in range(40, 50):
print(i, end=' ')
print('\033[{}m'.format(i), end='')
print('AaBbCcDdEeFfGg', end='')
print('\033[0m')
print()
@chuangzhu
Copy link
Author

chuangzhu commented Aug 28, 2018

screenshot_20180826_153709
(#5 is blinking...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment