Skip to content

Commit

Permalink
Fix red color contrast for error messages (#147)
Browse files Browse the repository at this point in the history
* Fix red color contrast for error messages 

The current red color is not contrasting enough in command prompt and powershell console.

* Update test_log.py
  • Loading branch information
atbagga authored and tjprescott committed Apr 17, 2019
1 parent c63836a commit 4ef3a1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions knack/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def wrap_msg_with_color(msg):
return wrap_msg_with_color

cls.COLOR_MAP = {
logging.CRITICAL: _color_wrapper(colorama.Fore.RED),
logging.ERROR: _color_wrapper(colorama.Fore.RED),
logging.CRITICAL: _color_wrapper(colorama.Fore.LIGHTRED_EX),
logging.ERROR: _color_wrapper(colorama.Fore.LIGHTRED_EX),
logging.WARNING: _color_wrapper(colorama.Fore.YELLOW),
logging.INFO: _color_wrapper(colorama.Fore.GREEN),
logging.DEBUG: _color_wrapper(colorama.Fore.CYAN)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_get_module_logger(self):


class TestCustomStreamHandler(unittest.TestCase):
expectation = {logging.CRITICAL: colorama.Fore.RED, logging.ERROR: colorama.Fore.RED,
expectation = {logging.CRITICAL: colorama.Fore.LIGHTRED_EX, logging.ERROR: colorama.Fore.LIGHTRED_EX,
logging.WARNING: colorama.Fore.YELLOW, logging.INFO: colorama.Fore.GREEN,
logging.DEBUG: colorama.Fore.CYAN}

Expand Down

0 comments on commit 4ef3a1c

Please sign in to comment.