ansi2html
ansi2html copied to clipboard
Support white background (currently always #AAAAAA gray)
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?
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.
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).
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.
Or, more generally, allow for any passed in background color or even none.