Closed buffet closed 3 years ago
Ah damn! Do you have any idea what other tools do to figure out if something's readable or not?
EDIT: for instance jq
?
I don't see jq
print anything in white. It prints null
in bold black (\x1b[1;30m
), however it apparently also does this in a dark theme (using alacritty's default to test, and it's just invisible).
In general I'd just avoid using white and black in the output.
Sadly, there is no one-size-fits-all solution to this problem. To do it properly, I don't think you'll get around implementing basic color theme support. You could try to have a light and dark mode and make them work on as many backgrounds as possible. The easiest option is to provide an option that disables coloring entirely.
I'll use some generic stackoverflow answer as a workaround for now: niv show | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g"
On several light themes, like Solarized Light (the one I'm using) the dependency name get printed white on white, and it not (or very poorly) readable at all.
This makes commands like
niv show
really hard to read.