Skip to content
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

docs: add truecolor info #273

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

docs: add truecolor info #273

wants to merge 4 commits into from

Conversation

bashbunni
Copy link
Member

Not sure if this should live in the README or in a dedicated docs section...
Will figure that out before merging. A review on the content itself would be
appreciated!

@bashbunni bashbunni marked this pull request as draft May 9, 2024 13:57
README.md Outdated
Comment on lines 171 to 181
`COLORTERM` - provides information about your terminal emulator's color
capabilities. Used primarily to specify if your emulator has `truecolor`
support.

`NO_COLOR` - turns colors on and off. `NO_COLOR=1` for non-colored text
outputs, `NO_COLOR=0` for colored text outputs.

`CLICOLOR` - turns colors on and off. `CLICOLOR=1` for colored text outputs,
`CLICOLOR=0` for non-colored text outputs.

`CLICOLOR_FORCE` - overrides `CLICOLOR`.
Copy link
Member

Choose a reason for hiding this comment

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

I believe none of these are sent over SSH by default.

ssh -v localhost

look for setting env.

I think the ones sent by default are TERM, LANG, and LC_*

README.md Outdated
can only detect `256 color` support. If you run `echo $COLORTERM` in your shell
you'll likely see `truecolor` as the result, which is what you want for ultra
colorful terminal outputs. If you don't see that as a result, it might be time
to try a new [terminal emulator][supported-emulators].
Copy link
Member

Choose a reason for hiding this comment

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

on another note, on termenv, we set truecolor for some terms anyway when we know they support it

https://github.com/muesli/termenv/blob/345783024a348cbb893bf6f08f1d7ab79d2e22ff/termenv_unix.go#L53

Copy link
Member

Choose a reason for hiding this comment

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

that's not on the latest termenv release though!

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh! I'll maybe leave a note that it's on the roadmap for termenv then 🤔 fwiw termstandard has a list of emulators that support truecolor, might be able to make that list even longer in termenv https://github.com/termstandard/colors?tab=readme-ov-file#fully-supporting I'll make an issue to that effect right meow

Copy link
Member

Choose a reason for hiding this comment

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

totally! need to see what each set as TERM and add them! I can do it later today 🙏

README.md Outdated
@@ -162,8 +162,6 @@ useradd --system --user-group --create-home myapp

That should do it.

###
Copy link
Member Author

Choose a reason for hiding this comment

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

oh HA, I can add this back in. I thought I had accidentally added this

terminal for support if `COLORTERM` is not detected.

> [!NOTE]
> Wish uses [termenv][termenv] under the hood, which will set truecolor for a few
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't even know if this sentence makes sense 😂 may need a lil tidy later

Copy link
Member

Choose a reason for hiding this comment

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

I think the chain of deps is more like wish -> lipgloss -> termenv

Copy link
Member Author

Choose a reason for hiding this comment

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

going to leave this part out for now given we're going to intro term changes soon which might include different default behaviour

terminal for support if `COLORTERM` is not detected.

> [!NOTE]
> Wish uses [termenv][termenv] under the hood, which will set truecolor for a few
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
> Wish uses [termenv][termenv] under the hood, which will set truecolor for a few
> Wish uses [termenv][termenv] under the hood, which will set `truecolor` for a few


`CLICOLOR_FORCE` - overrides `CLICOLOR`.

NO_COLOR vs CLICOLOR: if NO_COLOR is set or CLICOLOR=0 then the output should
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
NO_COLOR vs CLICOLOR: if NO_COLOR is set or CLICOLOR=0 then the output should
`NO_COLOR` vs `CLICOLOR`: if `NO_COLOR `is set or `CLICOLOR=0` then the output should

@bashbunni bashbunni marked this pull request as ready for review May 14, 2024 01:15
@tartavull
Copy link

I know this might not be the ideal place to ask, but I’m lost and desperate for a solution.

We have a Wish application that displays colors perfectly when run locally. Setting environment variables like NO_COLOR or CLICOLOR=0 correctly disables the colors as expected. However, when I deploy this Wish application to the server, it doesn’t display any colors.

I’ve tried the following steps without success:

  1. Tested every available terminal.

  2. Set SendEnv COLORTERM in the SSH configuration.
    Given this, and the wish app running locally seems like a strong indicator that the problem is the server and not the client.

  3. Added bubbletea.MiddlewareWithColorProfile(teaHandler, termenv.TrueColor) to the application.

  4. Set CLICOLOR=1, and making sure NO_COLOR is not set in the container.

Despite these efforts, the application still doesn’t display colors when run on a server. Any advice on what else I could try to resolve this issue would be greatly appreciated.

This description is more concise and clearly states the problem and the steps you’ve already taken to try to resolve it.

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.

3 participants