PaulJuliusMartinez / jless

jless is a command-line JSON viewer designed for reading, exploring, and searching through JSON data.
https://jless.io
MIT License
4.66k stars 90 forks source link

Syntax highlighting looks bad in certain color schemes #4

Open PaulJuliusMartinez opened 2 years ago

PaulJuliusMartinez commented 2 years ago

The syntax highlighting looks bad in certain color schemes. Most notably, when using Solarized Dark, sometimes the background and foreground color are indistinguishable:

Gruvbox:

gruvbox-jless

Solarized Dark:

solarized-dark-jless solarized-dark-jless2

The highlighting of search results in the previews are invisible, and the text of currently focused object keys is also unreadable.

In general, the text of the currently focused object key is often unreadable.

I'm unsure of how to solve this well and respect the user's chosen color scheme by using only the base set of 16 colors. Handling light vs. dark modes is especially difficult. (Solarized is bad because all of its Bright variants are so close together.)

The current code uses a mix of dimmed and inverted mode, but these don't always work well together in all terminals / color schemes.

robinbowes commented 2 years ago

Solarized Dark user on iterm here. I'm seeing the problem shown in your 3rd pic, ie. the highlighted key is illegible.

wbolster commented 2 years ago

selenized (solarized variation) light theme suffers from the same problem:

image

in general it's bad for legibility to use a colour for both the background and foreground at the same time.

NightMachinery commented 1 year ago

Another Solarized Light theme that looks bad:

image
raiguard commented 1 year ago

image One Dark here, looks terrible. Even just being able to change which of the basic 16 colors it uses would be nice!

f6p commented 1 year ago

If terminal uses low contrast color set there isn't much to do I guess.

Other than that I would like to propose utilizing JQ_COLORS variable.

Cheers 🍷

mortymacs commented 8 months ago

Is there any news or information about customizing the color scheme here?

dmgr commented 8 months ago

Just a simple "black & white" and "white & black" color schemes would be nice as a low hanging fruit for a strart.

Feuermurmel commented 2 months ago

This is how it looks in Terminal.app on macOS 12.7.4 with the default "Basic" profile.

image

net commented 1 week ago

The largest issue is the cursor highlighting, which would be fixed by making it always inverted with the default foreground, like in the status bar.