xxxxxxxxxx
import log21
# log21.get_color function helps you with color codes
log21.print(log21.get_color('LightBlue') + 'This is Blue.')
log21.print('\033[94mThis is blue as well.')
log21.print(log21.get_color('LR') + 'This text is Red.')
log21.print('\x1b[91mThis text is Red as well.')
xxxxxxxxxx
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
print(f"{bcolors.WARNING}Error : Test message !{bcolors.ENDC}")
xxxxxxxxxx
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'
print(f"{bcolors.WARNING}Warning: Example. Continue?{bcolors.ENDC}")
xxxxxxxxxx
import log21
log21.print(log21.get_color('LightGreen') + 'This text is Green')