ansi2html icon indicating copy to clipboard operation
ansi2html copied to clipboard

Support white background (currently always #AAAAAA gray)

Open lkraav opened this issue 3 years ago • 5 comments
trafficstars

Hi. Browsing through style.py seems to indicate there's currently no way to override #AAAAAA with plain old #FFFFFF. Am I missing something, or is this a feature request?

lkraav avatar Dec 28 '21 11:12 lkraav

Hi @lkraav ,

when ansi2html started at 0a732b1ed41afd7ebfbf10d6bb4f74709915bfa6 it was white…

Dark mode Light mode CSS class
Foreground #AAAAAA #000000 .f9
Background #000000 #FFFFFF .b9

…but at e24757d00ccf83aa0ae493f168770e5a2b42e088 it became gray:

Dark mode Light mode CSS class
Foreground #AAAAAA #000000 .f9
Background #000000 #AAAAAA :point_left: .b9

I believe ansi2html probably needs one new option for the foreground/text color and another one for the background, just like as terminals seem to have. I see it in both Terminator and Yakuake. We'll need to find a good way to integrate that with the existing --light-background, so that the UX still make sense:

# ansi2html --help | fgrep light
  -l, --light-background
                        Set output to 'light background' mode.

hartwork avatar Feb 02 '22 22:02 hartwork

Thanks for the find. I had to switch back to https://github.com/pixelb/scripts/blob/master/scripts/ansi2html.sh for time being, because that grey background just isn't good for readability (for my eyes, at least).

lkraav avatar Feb 03 '22 17:02 lkraav

It's a bit of a pity that these two tools are developing in parallel since 2010 I guess. Without checking I would have assumed the former source is dead. Sigh. I have no intentions of blaming your eyes, a custom color including white should absolutely be possible.

hartwork avatar Feb 03 '22 17:02 hartwork

Or, more generally, allow for any passed in background color or even none.

Juice805 avatar Aug 19 '22 00:08 Juice805