Created
March 29, 2015 16:48
-
-
Save JanneSalokoski/6fc43febb5878527b827 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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