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

The 16 ANSI colors do not map nicely to base16 #90

Open
GordianDziwis opened this issue Nov 19, 2024 · 5 comments
Open

The 16 ANSI colors do not map nicely to base16 #90

GordianDziwis opened this issue Nov 19, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@GordianDziwis
Copy link
Contributor

Describe the bug

The 16 ANSI colors currently do not map correctly to base16.

ANSI Colors

image

Base Colors

image

Base16 has 8 "gray colors": base00 to base07.
While ANSI has only 4 gray colors.

In the template, we are using more than 4 gray colors. The gray colors are important for contrasting selections in menus and GUI elements like float windows and borders and dividers.

Solutions

  1. Drop Support for 16 color terminals.
  2. Only use 4 "gray colors" in template. (This could be difficult)
@GordianDziwis GordianDziwis added the bug Something isn't working label Nov 19, 2024
@JamyGolden
Copy link
Member

In terminals that support it, we set ANSI 16-21 like this: https://github.com/tinted-theming/tinted-alacritty/blob/main/templates/base16-256.mustache#L36 so we still have access to the ansi colors for most terminals that use tinted-theming terminal themes.

@GordianDziwis
Copy link
Contributor Author

Are those indexes somewhere specified?

@JamyGolden
Copy link
Member

No they aren't, but I'm working on a tinted-terminal repo, should be out soon which puts all the terminal templates into 1 repository since they basically all follow the same ansi standard. I'll mention the specific colors that are set in ANSI 16-21 in that readme. Right now I "know" these colors because the different terminal apps all set the same colors to 16-21 and they were defined a long time ago and since Chris removed all the history of the original base16 repo, we don't have a way to find it. I know some conversations are found on web archive, but I haven't seen anything related to this yet.

@GordianDziwis
Copy link
Contributor Author

Could you then update the spec, with the ANSI color codes 16 to 21?

@JamyGolden
Copy link
Member

I've just created a PR: tinted-theming/home#123

But we can't assume that the extended ANSI colors exist since not all terminals allow for setting these ANSI values. Kermit and Rio terminal, which we have tinted-theming templates for, don't allow for setting this. In cases where it is not supported, using 16-21 will be shades of blue. But we can give README instructions to use tinted-shell (tinted shell shims these values in) if their terminal doesn't support setting 16-21 (which most people won't be aware of, so I think we should mention terminals by name if we have tinted-theming themes for them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants