Created
February 1, 2022 08:12
-
-
Save rotaliator/b8b58fdbb37755aea9529fe9498464db to your computer and use it in GitHub Desktop.
Simple python color print
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
class bcolors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKCYAN = '\033[96m' | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' | |
FAIL = '\033[91m' | |
ENDC = '\033[0m' | |
BOLD = '\033[1m' | |
UNDERLINE = '\033[4m' | |
def red(text): | |
print(f"{bcolors.FAIL}{text}{bcolors.ENDC}") | |
def green(text): | |
print(f"{bcolors.OKGREEN}{text}{bcolors.ENDC}") | |
def yellow(text): | |
print(f"{bcolors.WARNING}{text}{bcolors.ENDC}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment