Skip to content

Instantly share code, notes, and snippets.

@KerberosMorphy
Last active August 22, 2019 01:15
Show Gist options
  • Save KerberosMorphy/a4c54ad93a62ff47de1f7f72a61c93be to your computer and use it in GitHub Desktop.
Save KerberosMorphy/a4c54ad93a62ff47de1f7f72a61c93be to your computer and use it in GitHub Desktop.
Colored module
"""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