Skip to content

Instantly share code, notes, and snippets.

@sophiezhng
Created February 1, 2021 22:36
Show Gist options
  • Save sophiezhng/502e0c317ced0e67c9198f065ff37745 to your computer and use it in GitHub Desktop.
Save sophiezhng/502e0c317ced0e67c9198f065ff37745 to your computer and use it in GitHub Desktop.
ANSI escape code with Python
class colors: # You may need to change color settings
BOLD = "\033[;1m"
UNDERLINE = "\033[;4m"
REVERSE = "\033[;7m"
RESET = "\033[0;0m"
BLACK = '\033[30m'
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
MAGENTA = '\033[35m'
CYAN = '\033[36m'
WHITE = '\033[37m'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment