Skip to content

Conversation

@autra
Copy link

@autra autra commented Jan 20, 2026

This adds a theme that uses user defined colors in the terminal, so that framework-tool-tui is consistent with system themes.

Fix #96

src/tui/theme.rs Outdated
charge_bar: Color::Indexed(6),
bar_background: Color::Indexed(254),
highlighted_text: Color::Indexed(3),
informative_text: Color::Indexed(4),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I used the numbers that looks good with my theme, but maybe some of them must be changed to match other themes. I'd welcome if someone with another theme can test this.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2026-01-20-200914_2880x1920_scrot This is how it looks for me

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmhh not great. I need to revisit that.

@grouzen
Copy link
Owner

grouzen commented Jan 20, 2026

Hi! I'm happy to merge it once the CI is fixed.
I think it is related to #80

@autra
Copy link
Author

autra commented Jan 20, 2026

with another light theme (github):

image

With gruvbox-dark-hard:

image

Seems ok to me, so maybe indeed it is #80 indeed

@alerque
Copy link

alerque commented Jan 21, 2026

I would support this being the default! I suspect most people that have gone to the trouble of setting up a color scheme in their terminal uses it because they like it and are used to it. This brings the app features into focus instead of having to try to interpret what the color scheme is about.

@grouzen
Copy link
Owner

grouzen commented Jan 21, 2026

I would support this being the default! I suspect most people that have gone to the trouble of setting up a color scheme in their terminal uses it because they like it and are used to it. This brings the app features into focus instead of having to try to interpret what the color scheme is about.

Sounds good to me. I don't mind making ANSI the default. In this case, we might want to rename it to Default and place it first in the list.

@autra
Copy link
Author

autra commented Jan 22, 2026

Nice, glad you like this! I made some adaptations to make it look like the already present gruvbox theme, when I use the same theme in the terminal.

@autra
Copy link
Author

autra commented Jan 22, 2026

And I renamed it default and made it the default.

@tripplehelix
Copy link
Contributor

Once this has been merged (or before) we'll need to move the Framework theme into alphabetical order.

Should Default take its place first in the list or should it also be alphabetical? - Or is there a different system we should use?

@grouzen
Copy link
Owner

grouzen commented Jan 23, 2026

Once this has been merged (or before) we'll need to move the Framework theme into alphabetical order.

Should Default take its place first in the list or should it also be alphabetical? - Or is there a different system we should use?

I think it should go first in the list. The rest of them must be in alphabetical order (just my opinion).

@tripplehelix
Copy link
Contributor

The rest of them must be in alphabetical order (just my opinion).

Agreed

Dracula -> Framework -> Game Boy

You may need to modify the tests in /src/tui.rs, reordering the lists in that file then if need be modify what the tests should see.

I have also been trying to keep the themes in /src/tui/theme.rs in alphabetical order to keep it all tidy. Especially as @grouzen wants to add custom themes.

I can add a PR to your repo if you'd like me to apply this fix.

@tripplehelix
Copy link
Contributor

tripplehelix commented Jan 23, 2026

The unselected boarders are very similar to the background for me... is there a brighter colour you could use?

IMG_20260123_175106350

Brightness should be yellow

Default is not a good name, as rust kicks up errors... Maybe just use "Ansi"?

@grouzen
Copy link
Owner

grouzen commented Jan 23, 2026

The unselected boarders are very similar to the background for me... is there a brighter colour you could use?

IMG_20260123_175106350

Brightness should be yellow

Same in my case.
But I think the idea is that it is kind of our problem, and we need to tweak our terminal colours to make it work.
Given this, I'm personally fine with how @autra put it.
However, all this makes me think it might be a bad idea to make the ANSI theme the default, because depending on the terminal settings, borders or other elements might be invisible to a new user after installing the app.

@autra
Copy link
Author

autra commented Jan 24, 2026

But I think the idea is that it is kind of our problem, and we need to tweak our terminal colours to make it work.

Actually, For designing this theme, I used the base16 convention. It is widely used, but AFAIK not an universal convention. The way I did it, it is guaranteed to display well for those themes, but will it display ok with - for instance - the default ubuntu theme?

Maybe we should not use color n° 16 for the default theme, and have another theme for base16 terminal theme?

I will test on a default installation of ubuntu to check. I can test other distro as well.

@tripplehelix
Copy link
Contributor

My screenshot was from the TTY. Which is probably where it should work no?

@grouzen
Copy link
Owner

grouzen commented Jan 26, 2026

My screenshot was from the TTY. Which is probably where it should work no?

It makes sense too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a "ANSI" theme that just use terminal colors

4 participants