chriswalz/bit

Doesn't work very well with light color scheme

Hultner opened this issue · 11 comments

Describe the bug
A clear and concise description of what the bug is.
Text is almost unreadable or completely unreadable in a dozen or so different light color schemes from the popular base16 framework for terminal/syntax colours. Tried a dozen or so light color-schemes and only one were somewhat readable.

To Reproduce
Steps to reproduce the behavior:

  1. Pick a color scheme such as base16_github, grayscale-light, solarized light, one-lighter, papercolor-light, material-lighter, classic-light, atelier-cave-light
  2. Start bit
  3. Try to read text
  4. See unreadable text, no text or similar

Expected behavior
Text that's readable, configuration for a more basic light theme would be fine.

Screenshots
If applicable, add screenshots to help explain your problem.
Didn't screenshot them all but here's a few that exhibit said problem.

Screenshot 2020-10-26 at 22 19 25

Screenshot 2020-10-26 at 22 18 22

Screenshot 2020-10-26 at 22 17 11

Screenshot 2020-10-26 at 22 16 36

Screenshot 2020-10-26 at 22 16 26

Screenshot 2020-10-26 at 22 15 43

Screenshot 2020-10-26 at 22 15 01

Screenshot 2020-10-26 at 22 13 17

Desktop (please complete the following information):

  • OS: 64bit Mac OS X 10.15.7 19H2 x86_64 Darwin 19.6.0
  • Terminal: iterm
  • Shell: zsh

Additional context (Add any other context about the problem here)
As mentioned above, I'd be happy with a more simple monochrome that's configurable that works with light color-schemes as well. Of course the ideal would be support for actually base16_shell themes like a lot of "modern" cli tools got. But a simpler fallback for light color scheme users without base16 would still be desirable.

@Hultner Thanks for filing this issue. Agreed that bit can be difficult to read in some contexts. Currently, I'd like to avoid config files if possible.

One option is to have "absolute" colors that don't change due to the background however AFAIK that's not possible with https://github.com/c-bata/go-prompt.

Another option is to have two themes a light & dark them that changes based on the terminal background color. Surprisingly this isn't possible with all terminals AFAIK.

A popular tool with "pretty" syntax that handles this quite nicely is bat1, they use a $BAT_THEME environment variable which in my opinion is much nicer than a configuration file. They also have built in support of base16.

I'm not very familiar with go but a quick search turned up this library, might not be useful but I'll leave it here anyway.

I've added an experimental "inverted" theme. To enable set your env variable:

BIT_THEME=inverted

@chriswalz Is this released yet? it still looks just as bad, just slightly different on bit v0.8.2
image

Here's what I see

bit --version
bit version 0.8.2

image

image

image

image

I guess on your end it's the "Selected" color that is problematic. It's possible some colors aren't getting set

I've never coded go but I might be able to give it a go and see if I can create something reasonable looking if the build tool chain is easy/fast to set up. Tell me if that would be appreciated.

Yes, definitely take a look. Look for the function SuggestionPrompt( in util.go.

Once you clone or fork the repo & install go. run BIT_THEME=inverted go run main.go

@chriswalz I gave it a go (some Gothenburg humour right there), I made two themes to compare, I think it might turn out better this way since it's not always the same theme that works everywhere. Anyway here's a first screenshot. I took them with night shift on at first so I'm redoing the other colour themes without to give a good picture of how it looks.

The inverted one is more inspired by the original theme, while the monochrome one is just a brutalist minimalist approach and simply uses the defaults.
Screenshot 2020-10-29 at 21 23 42

Okay here's a full load of screenshots, I didn't test everything but at least of these two additional themes is readable on every combination I've tried, a good dozen of teams seems reasonable.

Screenshot 2020-10-29 at 21 23 42,
Screenshot 2020-10-29 at 21 23 29
Screenshot 2020-10-29 at 21 23 22

.
Screenshot 2020-10-29 at 21 23 17
Screenshot 2020-10-29 at 21 31 17
Screenshot 2020-10-29 at 21 30 30
Screenshot 2020-10-29 at 21 30 25
Screenshot 2020-10-29 at 21 29 41
Screenshot 2020-10-29 at 21 28 56
Screenshot 2020-10-29 at 21 27 44
Screenshot 2020-10-29 at 21 27 30
Screenshot 2020-10-29 at 21 34 32

Screenshot 2020-10-29 at 21 34 21

@chriswalz Added a PR #71