Last active
August 22, 2019 01:15
-
-
Save KerberosMorphy/a4c54ad93a62ff47de1f7f72a61c93be to your computer and use it in GitHub Desktop.
Colored module
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
"""REQUIRED pip install colored""" | |
from colored import fg, bg, attr | |
BLACK = 0 | |
RED = 9 | |
GREEN = 10 | |
YELLOW = 11 | |
BLUE = 12 | |
MAGENTA = 13 | |
GRAY = 7 | |
WHITE = 15 | |
ORANGE = 214 | |
END = attr(0) | |
def print_color(x, *, f=GRAY, b=BLACK): | |
print(f"""{fg(f)}{bg(b)}{x}{END}""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment