This is Work In Progress, it will take me some time to write up properly what's done and why, and what the caveats are -- but I wanted to raise this now before the branch gets too stale.
Rename the default theme to "light" and rework both it and the dark theme in terms of colours picked from the "fixed" 240-color palette. This should result in consistent colours between terminal emulators, with some caveats
the new colours here will likely be different to what people experienced prior to this patch
it's not impossible for folks to redefine these palette indexes, but it's much less common than redefining the 16 color indexes used prior, as the former are specified as an RGB triplet, and the latter merely as a name e.g. "yellow"
A drawback of doing this is that the colours will not display at all in terminals which don't support the 240 palette. I think that it's extremely uncommon for modern users to have a Terminal that doesn't support these; but more common would be having a misconfigured terminal (or some intermediary software: ssh, tmux, screen, etc. introducing a problem). This can be simulated by overriding TERM, e.g. with TERM=xterm-color (where xterm-color is a terminfo definition which doesn't support the 240 color palette).
To make this failure mode less catastrophic, many of the "selected" lines have reverseVideo set, and also the fg/bg colors swapped, which should look like a no-op when the color is supported, but is visible as reversevideo when the color is not supported. This means it can still be used. Example:
However, using this reverseVideo hack appears to introduce an unfortunate artifact in the right-hand border of selected lines when color is working:
I'm not sure yet whether this is a bug in this patch/hledger-ui, brick or vty. (The dark theme isn't affected)
Some TODOs
[x] demo screenshot of artifact bug
[x] document rework of dark theme in fixed colors
[ ] rename "terminal" theme to "inherit"?
[ ] rename "greenterm" to "greenonblack"
[X] close GH issue commands into one or more commit msgs
[ ] add data about color blind / other visual disability experiences
This is Work In Progress, it will take me some time to write up properly what's done and why, and what the caveats are -- but I wanted to raise this now before the branch gets too stale.
Rename the default theme to "light" and rework both it and the dark theme in terms of colours picked from the "fixed" 240-color palette. This should result in consistent colours between terminal emulators, with some caveats
A drawback of doing this is that the colours will not display at all in terminals which don't support the 240 palette. I think that it's extremely uncommon for modern users to have a Terminal that doesn't support these; but more common would be having a misconfigured terminal (or some intermediary software: ssh, tmux, screen, etc. introducing a problem). This can be simulated by overriding
TERM
, e.g. withTERM=xterm-color
(where xterm-color is a terminfo definition which doesn't support the 240 color palette).To make this failure mode less catastrophic, many of the "selected" lines have
reverseVideo
set, and also the fg/bg colors swapped, which should look like a no-op when the color is supported, but is visible as reversevideo when the color is not supported. This means it can still be used. Example:However, using this reverseVideo hack appears to introduce an unfortunate artifact in the right-hand border of selected lines when color is working: I'm not sure yet whether this is a bug in this patch/hledger-ui, brick or vty. (The dark theme isn't affected)
Some TODOs