Canop / bacon

background rust code check
https://dystroy.org/bacon
GNU Affero General Public License v3.0
1.93k stars 71 forks source link

Customize colors/themes #215

Open musjj opened 1 month ago

musjj commented 1 month ago

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.

Canop commented 3 weeks ago

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

musjj commented 3 weeks ago

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

Canop commented 3 weeks ago

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

musjj commented 3 weeks ago

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.