Created
January 10, 2012 18:39
-
-
Save minism/1590432 to your computer and use it in GitHub Desktop.
python terminal colors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terminal color definitions | |
class fg: | |
BLACK = '\033[30m' | |
RED = '\033[31m' | |
GREEN = '\033[32m' | |
YELLOW = '\033[33m' | |
BLUE = '\033[34m' | |
MAGENTA = '\033[35m' | |
CYAN = '\033[36m' | |
WHITE = '\033[37m' | |
RESET = '\033[39m' | |
class bg: | |
BLACK = '\033[40m' | |
RED = '\033[41m' | |
GREEN = '\033[42m' | |
YELLOW = '\033[43m' | |
BLUE = '\033[44m' | |
MAGENTA = '\033[45m' | |
CYAN = '\033[46m' | |
WHITE = '\033[47m' | |
RESET = '\033[49m' | |
class style: | |
BRIGHT = '\033[1m' | |
DIM = '\033[2m' | |
NORMAL = '\033[22m' | |
RESET_ALL = '\033[0m' |
Thanks G
Tnx 👍
Thank you. This really helped me make my clock/calender program.
Much better than what I was doing... Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
noice