Home / GitHub Page

Color scheme in the cli app

Hi All,

In the CLI if I am focused on the notes pane the title of the note is highlighted with a block of inverse color. If I move to the notebooks pane the highlighted note in the note pane goes to a simple dark text which is invisible on a dark background.

This makes it very hard to see what note you are on if you aren’t in the note pane and which notebook you are in when not in the notebook pane.

Is there a way to easily adjust the color scheme for the terminal app? I poked around the javascript but nothing jumped out at me.

It’s been awhile since I used the cli, but from what I remember the colors are entirely based off of your terminal colorscheme, you can probably tweak something in there to get the app to look right.

Thanks for the hint @CalebJohn It indeed is based off the color scheme. That helps me better articulate my problem. The cli highlights the active panes active row with the cli’s selection background/foreground combo. However it highlights the inactive panes active row with only the cli’s selection foreground.

So if background is black & foreground is white. And selection background foreground is white/black then the selected row in the active pane will show up as white on black but the inactive pane shows up as black on black.

Don’t suppose you know where in the code this stuff is set? The inactive pane should probably use one of the other colors in the terminals palette as this is likely to happen in a number of color schemes

Sorry I’m not sure, I took a quick look in the GuiClient code but couldn’t find anything that jumped out. I can dig into later if I have time and I’ll let you know.

I think the colours of the lists would be defined there: https://github.com/laurent22/tkwidgets/blob/db06d46d47c159b71b262bb221ba2344e48fb8ee/src/ListWidget.js#L275

So we use standard colours, here “white” and “black bright”, which are then converted to something else by the terminal colour scheme. I expect by trying different schemes you could find one that work well with Joplin. Perhaps it’s also an issue with the number of colours (16 vs 256 colours).

Hey @laurent,

That was exactly what I was looking for. Thanks! And thanks for making such a cool app!

For me bgBlackBright.black was giving dark text on a dark background. bgBlackBright.white looks much better while still giving the visual hint of which pane I am in.

For reference I am using kitty as my terminal with solarized color scheme. I am happy to submit a PR if you think this is a general problem, else I will just keep the change as a customisation.

For reference I am using kitty as my terminal with solarized color scheme. I am happy to submit a PR if you think this is a general problem, else I will just keep the change as a customisation.

I’d be concerned that it would make it more readable in some terminals but less so in other terminals. I’m not sure it’s even possible to create a cli app that works well in all terminals, as even major apps like vim sometimes look broken with some colour schemes.

Based on the feedback over the past few years, I think the current colour selection works relatively well (I think you’re the first one for who it is an issue), so I’d prefer to keep it that way, but thanks anyway for looking into it!