[Feature Request] Support the light color scheme in terminal.
Closed this issue · 7 comments
There seem to be two solutions.
- We use the black style of
tui::widgets::Block
as the background board of the entire interface, done with 5 lines of code, but it may conflict with the color scheme of the terminal. - We design a light-colored style interface to give users a choice to switch. But there may be some duplicate boilerplate code.
If the first suggestion works I think that's good enough, we just need to make it configurable.
As other features appear, there will be need for a configuration file sooner or later anyway.
Yeah, it must be fixed. Thanks for notifying.
I think that it could be a third solution. In the same way, the current background is linked to the terminal background theme, we can use the font color used for the terminal fonts. In this way, doesn't matter the terminal theme the user uses, termchat
always will fit with that theme.
The problem is how to get terminal font in a cross-platform way? there is an open issue crossterm-rs/crossterm#166
Maybe it would be cool if all colors used in termchat were configurable, and there is a wrapper theme struct for some predefined themes like Light and Dark.
Ok, I thought that chosen the first 16 xtem colors you somehow were linking to the terminal profile colors.
Maybe it would be cool if all colors used in termchat were configurable, and there is a wrapper theme struct for some predefined themes like Light and Dark.
I agree.
For a first step (and while the crossterm does not give support for terminal themes colors), you should be able to choose between light and dark themes from a CLI command. i.e: --theme <dark(default)>|<light>
. With this, at least the light theme people can use termchat
.
The next steps could be to add CLI arguments for different color parts or maybe even a configuration file as you say, @sigmaSd, with a theme section for this purpose.
I'm adding configuration for termchat and then I'll work on themes, hopefully I'll have a pr soon with this idea.
The light theme is now supported!