bacon icon indicating copy to clipboard operation
bacon copied to clipboard

Customize colors/themes

Open musjj opened this issue 1 year ago • 4 comments

It would be nice if you can customize the colors/themes of the TUI. Or at least make it follow the user's terminal color scheme.

musjj avatar Oct 01 '24 10:10 musjj

Can you clarify the problem you encounter with some screenshots and your OS+terminal configuration ?

Canop avatar Oct 13 '24 08:10 Canop

It looks like this:

image

The hardcoded brown and pink does not come from the colors I set for my terminal, confirmed with a color picker.

This is what my terminal colors look like, as printed by msgcat --color=test:

image

musjj avatar Oct 14 '24 16:10 musjj

Ok, but what's the problem ? All bacon colors are standard ANSI 8 bits colors.

Canop avatar Oct 14 '24 18:10 Canop

Yes, but the problem is that bacon is using the full range of 256 colors, which is almost never controlled by the user.

By default, most terminal applications uses the basic set of 8-16 colors from here: https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797#8-16-colors. These are the colors chosen by the user when they theme their terminal. So following this palette will automatically give the application an appearance that is consistent with the user's preferences.

musjj avatar Oct 14 '24 19:10 musjj

I would like to add that it doesn't look particularly readable in light terminals. Allowing at least minimal colour customisation would certainly help with the usability. image

savchenko avatar Nov 16 '24 13:11 savchenko

I'd be interested in making this change as a PR. @Canop what are your thoughts on this level of configuration? I see in the code that the colors are hard coded; it seems like it would be fairly straightforward to make them configurable.

mhedgpeth avatar Feb 14 '25 13:02 mhedgpeth

Thanks but I'm not interested by a PR there. Doing the code isn't the hard part.

Canop avatar Feb 14 '25 13:02 Canop

I'm in the process of writing a console app and terminal UI for my work, so I'd love to hear your perspective if you have another minute. What challenges do you foresee with implementing this? I.e. what do you see as the hard part? Thanks again for the quick response and the fantastic tool; today it saved me so much time and gave me perspective. It was the missing piece... :)

mhedgpeth avatar Feb 14 '25 22:02 mhedgpeth

@mhedgpeth, if you ever get around to opening a PR, I'd appreciate if you post it here. I'd prob just fork this repo and rebase your changes because the colors are quite hard to see against my color theme.

mahume avatar Jun 11 '25 13:06 mahume

Can you please have a look at https://github.com/Canop/bacon/pull/366 ?

Canop avatar Jun 11 '25 19:06 Canop