-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add a theme that uses terminal colors #490
Comments
Thank you for the feedback - interesting idea. Unfortunately, highlighting themes typically need to define more than the 8 basic ANSI colors, so this would really just be a subpar fallback solution. It's also unclear to me if this could be implemented with a reasonable effort. I currently can't think of a good way to make this work with the current Sublime-Syntax theme infrastructure. |
Not sure how the sublime-syntax stuff works but I think some themes do exist which only define 8 colors (technically 16) such as possibly the Base16 Color Schemes (Unconfirmed, I haven't looked into this yet but I know most of the base16 shell themes come in 16 or 256 variants.) Other than that, when bat fails me I've been piping through |
i regularly switch my terminal (and gnome and emacs) themes between a dark and a light version, depending on the light circumstances (e.g. dark or sunny environment) to avoid eye strain. unfortunately none of the built-in i have settled on solarized dark/light for a long time, but this issue is not specific to these (yellowish and dark blue) background colours. i would love to see only the basic 8 (?) colour terminal palette as one of of the themes, since those are extremely legible on both backgrounds (it's one of the design goals of the solarized palette). |
I see the need, but I really don't know how that would be implemented with Sublime Text Themes, which are used by |
perhaps the colours can be "rounded" to the nearest ansi color? |
You can round a 24-bit ANSI color to the nearest 8-bit ANSI color (we actually do this in |
well i guess just rounding to bright red green blue cyan magenta yellow (6 extreme colours, "#ff0000") and "base" would work. |
Keep in mind that all 256 colors are (in most cases) user configurable. |
And adding to the above, many of today's color schemes support true color, 256, and 16. For example, onedark.vim has a configurable named
|
Okay. That could be worth a try.
Oh dear, I didn't know this was possible.
Yes. But that doesn't really help, right? The user would have to set these in the terminal emulator. |
|
I'd love to see this as well. I use a custom color theme in my personal terminal that I've already carefully configured. It would be great if |
I'm working on adding support for base16 themes using the 16 ANSI colours. I should have a pull request ready tomorrow. I might also try adding a very basic 8-color theme that should look decent on any terminal emulator with the 8 colours being roughly similar to their names (0=black, 1=red, 2=green, etc.) |
@mk12 Awesome! |
As the author of It's somewhat of a hack, but the TextMate-theme specific logic in syntect has a bunch of optimizations that would be annoying to replicate in a custom highlighting pipeline. It also allows |
I can confirm that those Unfortunately it's seems to me that the issue is not specific to Using https://github.com/paulcpederson/solarized-sublime.git with |
Huh. Something I never realized before is that when I flip the terminal between "solarized dark" and "solarized light", only chars styled with default foreground and background change; but the palette remains assigned to colors 0–15 colors in a fixed, non-inverting manner: This seems in-line with https://github.com/altercation/solarized#the-values intent. However it's NOT what I was hoping for 😉 I really want to flip the terminal theme and have existing output re-styled. Another option is a theme that only uses default fg + the 8 accent colors, but not the neutral tones. Actually can add one "middle" tone too, especially for low-attention things like line numbers. |
@cben If you want to flip between solarized light and solarized dark, I recommend using the base16 versions of the solarized themes for your terminal (for the Gnome terminal, that's https://github.com/aaron-williamson/base16-gnome-terminal), and then using the base16 bat theme I created. Making a bat theme that works well flipping between light and dark -- that is, a single ansi theme instead of ansi-light and ansi-dark -- is not possible because typical terminal themes use fixed slots for "black-ish" and "white-ish," not "foreground" and "background." This is the problem that base16 solves. |
Thanks for this clear explanation, now I finally got the point of base16. Concrete tips for benefit of others new to this:
|
Italic does hurt in some terminal emulators. It also does not work in |
I spent a lot of time to customize my terminal named colors, and I wish there was a bat theme that uses them so it doesn’t look bad in my terminal.
The benefit is that it provides a backup theme that works across terminals if no other theme works with the terminal theme.
The text was updated successfully, but these errors were encountered: