From f8381749c31a2b186ebfd105e81c0e0364420c93 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 22 Jun 2021 10:49:51 -0700 Subject: [PATCH] Improve terminal colors on light-colored terminal backgrounds --- dangerzone/cli.py | 4 ++-- dangerzone/global_common.py | 2 +- dangerzone/gui/tasks.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dangerzone/cli.py b/dangerzone/cli.py index e688c32..2e40e97 100644 --- a/dangerzone/cli.py +++ b/dangerzone/cli.py @@ -9,7 +9,7 @@ from .common import Common def print_header(s): click.echo("") - click.echo(Style.BRIGHT + Fore.LIGHTWHITE_EX + s) + click.echo(Style.BRIGHT + s) def exec_container(global_common, args): @@ -22,7 +22,7 @@ def exec_container(global_common, args): # Hack to add colors to the command executing if line.startswith(b"> "): print( - Fore.YELLOW + "> " + Fore.LIGHTCYAN_EX + line.decode()[2:], + Style.DIM + "> " + Style.NORMAL + Fore.CYAN + line.decode()[2:], end="", ) else: diff --git a/dangerzone/global_common.py b/dangerzone/global_common.py index 842957e..f7de028 100644 --- a/dangerzone/global_common.py +++ b/dangerzone/global_common.py @@ -441,7 +441,7 @@ class GlobalCommon(object): def exec_dangerzone_container(self, args): args = [self.dz_container_path] + args args_str = " ".join(pipes.quote(s) for s in args) - print(Fore.YELLOW + "> " + Fore.CYAN + args_str) + print(Style.DIM + "> " + Style.NORMAL + Fore.CYAN + args_str) # Execute dangerzone-container return subprocess.Popen( diff --git a/dangerzone/gui/tasks.py b/dangerzone/gui/tasks.py index f6ece5c..63227d9 100644 --- a/dangerzone/gui/tasks.py +++ b/dangerzone/gui/tasks.py @@ -21,7 +21,7 @@ class TaskBase(QtCore.QThread): if line.startswith(b"> "): print( - Fore.YELLOW + "> " + Fore.LIGHTCYAN_EX + line.decode()[2:], + Style.DIM + "> " + Style.NORMAL + Fore.CYAN + line.decode()[2:], end="", ) else: