-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive TUI mode does not utilize terminal colors #23
Comments
What colours are you intending? Syntax highlighted for code or some such? Can you provide an example of what you are expecting? Do you have an example library that would be possible to use for this? |
Ah gotcha. Yes that seems like something useful. I have no idea how to go about doing this, but if I find anything ill post it here. |
I am also interested in this. I don't care about terminal colors or not, but the fact that running I really want to use |
@DannyBen Sorry what do you mean by switching to a dark mode? Can you provide a screenshot of what you have before to help me see what you mean. |
Yeah thats fairly annoying. I didn't actually tweak anything out of the box, instead using the defaults from https://github.com/rivo/tview I might have to have a look over there and see if there is a way to respect what is being provided. |
@boyter You can read my explainations on the issue you reference for a bit of detail concerning the colors. Also see how tcell handles coloring here.. https://github.com/gdamore/tcell#24-bit-color
Now while this method works for respecting the defined terminal palette, it is not very helpful when you actually want to use colors outside 4/8-bit colors available with indexed palettes. Tcell has a fix for this by using the https://github.com/gdamore/tcell/blob/47ec3a77754f83e84481fc9cdd0bc2072cd292ba/color.go#L1034 Also neighboring this method is PaletteColor which allows you to define the index of a color from the palette, (using 0-16 will pull the defined palette colors from their terminal). When using I have had a bit of experience dealing with this stuff. You can even see here where I am trying to convey the usefulness of the first 16 indexed colors in as far as how they relate to the user's custom palette settings. |
Thanks. Ill be going through all of this in the next few days. Id love to get this all out of the box for people if possible, but if I have to resort to some canned themes I am prepared to do so. |
@boyter I understand it can be quite daunting or more work to support/implement all the things... I agree that sometimes it's easier to just make it simpler with a hard set scheme. The biggest problem I have come across is that the You can see in my fork how much I have changed things because of the original lacking things. I have even modified the style/theming for the color/region tags in textviews because I needed something more robust. Since the code it comes from is unpolished it has not been published to git public... let me see if i can get you some of it https://github.com/digitallyserviced/tview-theming this provides a way to define styles and string formatting using a config file. As well as a way to name styles/themes when using the tags in a textview sorry its a mess, but hopefully you can get something useful from it |
@digitallyserviced I enjoy learning new things so while its a lot its not that much of a worry... other than time. What you have put there is a great start for me to start playing around with. Although I am going to need assistance from a lot of people to get this right methinks... or setup a heap of styles so I can verify I get most of it right. Perhaps both. |
I dont mind answering questions or helping out with ideas, pointing you in directions, etc.... hit me up on the twitters or discord in my profile... you may even give me motivation and light a fire under my ass to clean up and polish all i've done with tview with my own app i haven't made publicly available... It is actually specifically for customizing a user's terminal palette and color scheme... I have animations, a better input handler, stacked views, custom primitives out the ass, a embedded Hit me up! |
I tried I agree with previous posts--the right solution is to not set a background color at all, and use foreground colors from the 16 ANSI colors. Whatever terminal/color lib you're using seems too clever by half. In the meantime, one workaround is setting $TERM to something that doesn't support colors at all: TERM=vt100 cs |
I may just re-implement using https://github.com/charmbracelet/bubbletea which appears to handle this a lot better. |
I tried running bubbletea/examples/list-default and it looks a lot better on my snowflake light theme setup! By default it seems to use true color for some things and ANSI colors for others. And of course on my setup the ANSI colors are very readable, while the true colors are just okay. Luckily it can be configured. |
That was my experience as well. I setup a few terminals with different themes to capture all the issues and it appeared to work fine. Just working though how I can get the code display in a list now and all the events. Looks promising though. |
It would be nice if
cs
could respect terminal colors in interactive TUI mode.The text was updated successfully, but these errors were encountered: