tealdeer-rs / tealdeer

A very fast implementation of tldr in Rust.
https://tealdeer-rs.github.io/tealdeer/
Apache License 2.0
4.17k stars 123 forks source link

How does tealdeer's color configuration interface with a terminal's own color scheme? #224

Closed bound-variable closed 2 years ago

bound-variable commented 2 years ago

I'm using Guake. I realized that the colors in tealdeer's config don't appear, e.g., cyan doesn't appear as cyan. So I looked into my terminal's color scheme and found that by changing the scheme, tldr's colors also changed. So, is there any information on how these sources of color schemes interact? It seems there's no point in my changing tealdeer's config because the terminal's color schemes significantly alter the intended results.

Thanks

dbrgn commented 2 years ago

If your terminal uses a theme that changes the appearance of colors, there's not much that we can do about it, right?

In the end, colors in the terminal are ANSI escape sequences mapped to color names. How these color names are displayed to the user is up to the terminal.

bound-variable commented 2 years ago

I understand that this is not an issue the developers of this program can resolve. I was merely asking for information on how they interface with one another. I was under the impression that all terminals use some sort of color scheme. Given that, it seems there's no way to render a terminal program with an intended set of colors, since the terminal will always modify those colors. Or perhaps there's a universal default color scheme? I don't know.

dbrgn commented 2 years ago

If a terminal application outputs something with the escape code 32;42, this is documented as "green". uxterm uses a very bright, "grassy" green while alacritty uses a more yellowish, softer green. But both are green. There's no other specification how "green" should look like.

Of course the terminal or a theme is free to remap colors as it desires, but it may leave users (as you) confused. The terminals I know usually don't do that.

bound-variable commented 2 years ago

Got it. Thanks again.

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Wednesday, November 24th, 2021 at 3:24 PM, Danilo Bargen @.***> wrote:

If a terminal application outputs something with the escape code 32;42, this is documented as "green". uxterm uses a very bright, "grassy" green while alacritty uses a more yellowish, softer green. But both are green. There's no other specification how "green" should look like.

Of course the terminal or a theme is free to remap colors as it desires, but it may leave users (as you) confused. The terminals I know usually don't do that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.