summaryrefslogtreecommitdiff
path: root/cmd2/constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/constants.py')
-rw-r--r--cmd2/constants.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/cmd2/constants.py b/cmd2/constants.py
index 06d6c6c4..2229976a 100644
--- a/cmd2/constants.py
+++ b/cmd2/constants.py
@@ -4,6 +4,8 @@
import re
+from colorama import Fore, Back
+
# Used for command parsing, output redirection, tab completion and word
# breaks. Do not change.
QUOTES = ['"', "'"]
@@ -25,4 +27,49 @@ COLORS_NEVER = 'Never'
COLORS_TERMINAL = 'Terminal'
COLORS_ALWAYS = 'Always'
+
+# Foreground color presets.
+FG_COLORS = {
+ 'black': Fore.BLACK,
+ 'red': Fore.RED,
+ 'green': Fore.GREEN,
+ 'yellow': Fore.YELLOW,
+ 'blue': Fore.BLUE,
+ 'magenta': Fore.MAGENTA,
+ 'cyan': Fore.CYAN,
+ 'white': Fore.WHITE,
+ 'gray': Fore.LIGHTBLACK_EX,
+ 'lightred': Fore.LIGHTRED_EX,
+ 'lightblue': Fore.LIGHTBLUE_EX,
+ 'lightgreen': Fore.LIGHTGREEN_EX,
+ 'lightyellow': Fore.LIGHTYELLOW_EX,
+ 'lightblue': Fore.LIGHTBLUE_EX,
+ 'lightmagenta': Fore.LIGHTMAGENTA_EX,
+ 'lightcyan': Fore.LIGHTCYAN_EX,
+ 'lightwhite': Fore.LIGHTWHITE_EX,
+ 'reset': Fore.RESET,
+}
+
+# Background color presets.
+BG_COLORS = {
+ 'black': Back.BLACK,
+ 'red': Back.RED,
+ 'green': Back.GREEN,
+ 'yellow': Back.YELLOW,
+ 'blue': Back.BLUE,
+ 'magenta': Back.MAGENTA,
+ 'cyan': Back.CYAN,
+ 'white': Back.WHITE,
+ 'gray': Back.LIGHTBLACK_EX,
+ 'lightred': Back.LIGHTRED_EX,
+ 'lightblue': Back.LIGHTBLUE_EX,
+ 'lightgreen': Back.LIGHTGREEN_EX,
+ 'lightyellow': Back.LIGHTYELLOW_EX,
+ 'lightblue': Back.LIGHTBLUE_EX,
+ 'lightmagenta': Back.LIGHTMAGENTA_EX,
+ 'lightcyan': Back.LIGHTCYAN_EX,
+ 'lightwhite': Back.LIGHTWHITE_EX,
+ 'reset': Back.RESET,
+}
+
DEFAULT_SHORTCUTS = {'?': 'help', '!': 'shell', '@': 'run_script', '@@': '_relative_run_script'}