Skip to content

Instantly share code, notes, and snippets.

View sagz's full-sized avatar

Sagar Savla sagz

View GitHub Profile
@sagz
sagz / ANSI_colours.py
Last active December 25, 2015 09:29
Print all 256 ANSI colours in the terminal with this Python code snippet
def colour(this_colour, string):
return "\033[" + this_colour + "m" + string + "\033[0m"
for i in range(256):
c = '38;05;%d' % i
print( colour(c, 'colour ' + c) )