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

Port Sonokai color scheme to iTerm2 themes #115

Closed
andreihh opened this issue Jan 29, 2025 · 4 comments
Closed

Port Sonokai color scheme to iTerm2 themes #115

andreihh opened this issue Jan 29, 2025 · 4 comments

Comments

@andreihh
Copy link
Contributor

iTerm2 has an extensive list of themes, with auto-generated ports for most terminals: https://github.com/mbadolato/iTerm2-Color-Schemes.

I created a port to iTerm2 themes for the default Sonokai color scheme as follows:

  • ANSI colors taken from the Vim terminal colors
  • Cursor color taken from Vim auto Cursor highlight, which reverses fg and bg0
  • Selection background color taken from Vim Visual highlight
  • Selection text uses the default foreground fg
  • Bold color (i.e., if all bold text is rendered with the same color) is #FFFFFF to differentiate from regular foreground

Example screenshot:
Image

Before I send the pull request, I would like to know if you agree / approve of the port, and if you have any suggestions for the colors.

You're also welcome to review the commit for the color palette of one of the terminals (they're all auto-generated from the iTerm2 scheme, so they're all the same).

@antoineco
Copy link
Collaborator

Good job!

Since the color palette is designed for syntax and not for a general purpose (terminals, web, etc.), you might want to apply a shade to the colors 0-7 to create bright variants, like I suggested here:

We don't want to change the palette in the Vim colorscheme, but it doesn't mean that you can't do your own interpretation of it in derivatives. As long as the base palette is being prominently used, it's still Sonokai 🙂

@andreihh
Copy link
Contributor Author

andreihh commented Feb 1, 2025

Thanks!

I actually prefer having a uniform experience between the native terminal and Vim embedded terminal, and I didn't feel like the UX was impacted negatively by the absence of bright colors (at least for the tools I use). Other popular themes also have equal normal and bright colors (e.g., Tokyo Night, Rose Pine, Monokai Classic, Monokai Pro, Tomorrow Night, etc.).

If you prefer having dedicated bright colors, do you have suggestions for the palette?

@antoineco
Copy link
Collaborator

antoineco commented Feb 3, 2025

Fair enough. I don't usually use terminal colors contributed by the community for the opposite reason: they often don't respect bright semantics very well (either reverse them arbitrarily or don't differentiate between non-bright and bright at all). I explained my reasoning here: sainnhe/gruvbox-material#152 (comment).

I also don't use the Vim terminal for similar reasons (degradation/inconsistencies of colors), so I don't think my opinion should be authoritative here with regards to sonokai or any other of sainnhe's colorschemes.

Based on discussions I followed in various GitHub issues, there are 2 opposite opinions on this:

  • Terminal colors should follow NR-16 when the terminal is capable of displaying 16 colors for semantical reasons.
  • Terminal colors are set at the discretion of the colorscheme's author, ignoring bright semantics is acceptable if it doesn't fit the design.

So, pick a camp I guess 🙂


If you prefer having dedicated bright colors, do you have suggestions for the palette?

In my own dotfiles I have base colors lightened (dark mode) or darkened (light mode) by 10 points in the OKHSL color space.

@andreihh
Copy link
Contributor Author

andreihh commented Feb 3, 2025

Thanks for the explanations! I prefer the consistency and will keep the 8-color palette for now. If need be, I think it's a lot less disruptive to add support for bright colors later than the other way around.

andreihh added a commit to andreihh/alacritty-theme that referenced this issue Feb 16, 2025
andreihh added a commit to andreihh/alacritty-theme that referenced this issue Feb 16, 2025
See https://github.com/sainnhe/sonokai:
- ANSI colors are the Vim terminal colors
- Cursor color is the Vim auto `Cursor` highlight (inverts `fg` and `bg0`)
- Selection background is the Vim `Visual` highlight
- Selection text foreground doesn't change

See details in sainnhe/sonokai#115.
chrisduerr pushed a commit to alacritty/alacritty-theme that referenced this issue Feb 16, 2025
See https://github.com/sainnhe/sonokai:
- ANSI colors are the Vim terminal colors
- Cursor color is the Vim auto `Cursor` highlight (inverts `fg` and `bg0`)
- Selection background is the Vim `Visual` highlight
- Selection text foreground doesn't change

See details in sainnhe/sonokai#115.
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 a pull request may close this issue.

2 participants