Skip to content

Instantly share code, notes, and snippets.

@IDK9911
Created March 18, 2023 14:20
Show Gist options
  • Save IDK9911/d375c8743ec999d0fa555f586d14537f to your computer and use it in GitHub Desktop.
Save IDK9911/d375c8743ec999d0fa555f586d14537f to your computer and use it in GitHub Desktop.
How to colorize output in python
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
END = '\033[0m'
print(color.BOLD + 'Hello, World!' + color.END)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment