Skip to content

Instantly share code, notes, and snippets.

@smmoosavi
Last active June 22, 2021 06:42
Show Gist options
  • Save smmoosavi/95121de86338de31864c to your computer and use it in GitHub Desktop.
Save smmoosavi/95121de86338de31864c to your computer and use it in GitHub Desktop.
Python terminal colors
class CLI(): pass
CLI.RESET = '\033[0m'
CLI.BOLD = '\033[1m'
CLI.DARK = '\033[2m'
CLI.UNDERSCORE = '\033[4m'
CLI.Blink = '\033[5m'
CLI.Reverse = '\033[7m'
CLI.Concealed = '\033[8m'
CLI.GREY = '\033[30m'
CLI.RED = '\033[31m'
CLI.GREEN = '\033[32m'
CLI.YELLOW = '\033[33m'
CLI.BLUE = '\033[34m'
CLI.MAGENTA = '\033[35m'
CLI.CYAN = '\033[36m'
CLI.WHITE = '\033[37m'
CLI.BG_GREY = '\033[40m'
CLI.BG_RED = '\033[41m'
CLI.BG_GREEN = '\033[42m'
CLI.BG_YELLOW = '\033[43m'
CLI.BG_BLUE = '\033[44m'
CLI.BG_MAGENTA = '\033[45m'
CLI.BG_CYAN = '\033[46m'
CLI.BG_WHITE = '\033[47m'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment