Skip to content

Instantly share code, notes, and snippets.

@JanneSalokoski
Created March 29, 2015 16:48
Show Gist options
  • Save JanneSalokoski/6fc43febb5878527b827 to your computer and use it in GitHub Desktop.
Save JanneSalokoski/6fc43febb5878527b827 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import time
class Color:
def __main__(self):
pass
def print(self, string, fg, bg=0, end="\n"):
print("\033[38;5;{}m\033[48;5;{}m{}".format(fg, bg, string), end=end)
def test(self):
for bg in range(0, 256):
for fg in range(0, 256):
self.print("{:>4}:{:<4}".format(fg, bg), fg, bg, end="")
print()
color = Color()
def main():
color.test()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment