From 65186ccb4da204de0079bfb69c1d3ea7386f13f2 Mon Sep 17 00:00:00 2001 From: Aruuthakur <102435346+Aruuthakur@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:51:30 +0530 Subject: [PATCH 1/3] Improve readability of reports for dark mode browers --- auditor/evaluation/color_util.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 auditor/evaluation/color_util.py diff --git a/auditor/evaluation/color_util.py b/auditor/evaluation/color_util.py new file mode 100644 index 0000000..f3a7d37 --- /dev/null +++ b/auditor/evaluation/color_util.py @@ -0,0 +1,19 @@ +from colorama import Fore, Back, Style, init + +# Initialize colorama +init(autoreset=True) + +def print_in_dark_mode(text): + print(Back.BLACK + Fore.WHITE + text + Style.RESET_ALL) + +def print_in_light_mode(text): + print(Back.WHITE + Fore.BLACK + text + Style.RESET_ALL) + +# Example usage +if __name__ == "__main__": + dark_mode = True # You can set this based on user preferences or the application's dark mode status + + if dark_mode: + print_in_dark_mode("This is a dark mode message.") + else: + print_in_light_mode("This is a light mode message.") \ No newline at end of file From 4bd8d9fa4db3c0381c80b32666407fe446287d0b Mon Sep 17 00:00:00 2001 From: Aruuthakur <102435346+Aruuthakur@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:54:02 +0530 Subject: [PATCH 2/3] Improve readability for dark mode browers --- auditor/evaluation/color_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auditor/evaluation/color_util.py b/auditor/evaluation/color_util.py index f3a7d37..c101b4a 100644 --- a/auditor/evaluation/color_util.py +++ b/auditor/evaluation/color_util.py @@ -16,4 +16,5 @@ def print_in_light_mode(text): if dark_mode: print_in_dark_mode("This is a dark mode message.") else: - print_in_light_mode("This is a light mode message.") \ No newline at end of file + print_in_light_mode("This is a light mode message.") + \ No newline at end of file From 808930612c1a3fbd006960b1d02d695001488082 Mon Sep 17 00:00:00 2001 From: Aruna <102435346+Aruuthakur@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:57:28 +0530 Subject: [PATCH 3/3] Update color_util.py --- auditor/evaluation/color_util.py | 1 - 1 file changed, 1 deletion(-) diff --git a/auditor/evaluation/color_util.py b/auditor/evaluation/color_util.py index c101b4a..b18c040 100644 --- a/auditor/evaluation/color_util.py +++ b/auditor/evaluation/color_util.py @@ -17,4 +17,3 @@ def print_in_light_mode(text): print_in_dark_mode("This is a dark mode message.") else: print_in_light_mode("This is a light mode message.") - \ No newline at end of file