From 2f36bbc4f133c1395410059189ee7062f40f0df3 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 2 Feb 2022 23:40:00 +0100 Subject: [PATCH] style.py: Get .inv_foreground in sync with .body_foreground .inv* CSS classes were meant to be the exact opposite of their counterpart. So with Rule(".body_foreground", color=("#000000", "#AAAAAA")[dark_bg]) then class .inv_foreground should have been #AAAAAA rather than #FFFFFF from the beginning. --- ansi2html/style.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansi2html/style.py b/ansi2html/style.py index 93b5601..d07cf63 100644 --- a/ansi2html/style.py +++ b/ansi2html/style.py @@ -210,7 +210,7 @@ def get_styles( color=("#000000", "#FFFFFF")[dark_bg], font_weight=("bold", "normal")[dark_bg], ), - Rule(".inv_foreground", color=("#000000", "#FFFFFF")[not dark_bg]), + Rule(".inv_foreground", color=("#000000", "#AAAAAA")[not dark_bg]), Rule(".inv_background", background_color=("#AAAAAA", "#000000")[not dark_bg]), # These effects are "SGR (Select Graphic Rendition) parameters" # https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters