Open vi opened 1 week ago
regarding point 1, for now I think a good setup would be to introduce a cli option that turns off the colors, I will have to see how I will work this out,
I suggest this workaround for your case: pipe into sed like the following intentrace ls | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g'
it also works when the background is whitish
for point 2 and the rest, I agree there's a general assumption that everyone uses dark mode terminals, however I think any thing in the vicinity of "working around a light/dark mode" of sorts for a terminal application will require intentionality in design to remedy, I don't believe there's a generalizable way of working around a white background terminal, however I'm interested in making this work so I'll prioritize this (most likely this will also be a cli option)
Try running with NO_COLOR=1. Most likely the library used for coloring understands that. See https://no-color.org/.
Yes, it does remove the colours.
Maybe there is another magical environment variable to map lighter colours to darker ones for light backgrounds?
Maybe there is another magical environment variable to map lighter colours to darker ones for light backgrounds?
I am not aware of any such consensus. There's NO_COLOR
which explicitly disables usage of colors and CLICOLOR{,_FORCE}
which control automatic detection of whether colors should be used. These three are semantically equivalent to --color={never,auto,always}
some programs have.
You should consider changing your terminal color palette so that "bright" colors are actually darker, that would work for all programs using 3/4-bit colors.
P. S. Multiple Rust tools that use coloured terminal output seem to assume black background by default and look poor in my setup. Maybe there is a cross-app way (e.g. a environment variable) to notify all the programs that the background is white?