diff --git a/pupy/pupylib/utils/term.py b/pupy/pupylib/utils/term.py index caa04ae9..21c47908 100644 --- a/pupy/pupylib/utils/term.py +++ b/pupy/pupylib/utils/term.py @@ -76,18 +76,24 @@ def colorize(s, color): COLOR_STOP="\033[0m" if color.lower()=="random": color=random.choice(["blue","red","green","yellow"]) + if color.lower()=="blue": res="\033[34m"+s+COLOR_STOP - if color.lower()=="red": + elif color.lower()=="red": res="\033[31m"+s+COLOR_STOP - if color.lower()=="green": + elif color.lower()=="green": res="\033[32m"+s+COLOR_STOP - if color.lower()=="yellow": + elif color.lower()=="yellow": res="\033[33m"+s+COLOR_STOP - if color.lower()=="grey": + elif color.lower()=="magenta": + res="\033[35m"+s+COLOR_STOP + elif color.lower()=="cyan": + res="\033[36m"+s+COLOR_STOP + elif color.lower()=="grey": res="\033[37m"+s+COLOR_STOP - if color.lower()=="darkgrey": + elif color.lower()=="darkgrey": res="\033[1;30m"+s+COLOR_STOP + return res def terminal_size():