summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Slenders <jonathan@slenders.be>2016-02-24 21:24:00 +0100
committerJonathan Slenders <jonathan@slenders.be>2016-02-24 21:24:00 +0100
commitff0f2c34b75ec18e9ba27beb906e62f38532f8fd (patch)
tree0edaaa733ff774f3bef65ce9d48dd3ed25224871
parent344b328ed33e7caa2c8438e53089f65a6fea89b4 (diff)
Set correct default color on Windows. (Gray instead of high intensity gray.)
-rw-r--r--prompt_toolkit/terminal/win32_output.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/prompt_toolkit/terminal/win32_output.py b/prompt_toolkit/terminal/win32_output.py
index 60d8054b..f792674d 100644
--- a/prompt_toolkit/terminal/win32_output.py
+++ b/prompt_toolkit/terminal/win32_output.py
@@ -490,16 +490,16 @@ class ColorLookupTable(object):
:param fg_color: Foreground as text. E.g. 'ffffff' or 'red'
:param bg_color: Background as text. E.g. 'ffffff' or 'red'
"""
- # Take white as the default foreground color.
- # (otherwise many things will be invisible.)
+ # Set the default foreground color. (Otherwise, many things will be
+ # invisible.) Note that gray is the default on Windows, not GRAY|INTENSITY!
if fg_color is None:
- fg_color = 'ffffff'
-
- # Foreground.
- if fg_color in FG_ANSI_COLORS:
- fg_index = FG_ANSI_COLORS[fg_color]
+ fg_index = FOREGROUND_COLOR.GRAY
else:
- fg_index = self._color_indexes(fg_color)[0]
+ # Foreground.
+ if fg_color in FG_ANSI_COLORS:
+ fg_index = FG_ANSI_COLORS[fg_color]
+ else:
+ fg_index = self._color_indexes(fg_color)[0]
# Background.
if bg_color in BG_ANSI_COLORS: