Terminus
Terminus copied to clipboard
Match background color to panel color
There is a contrast difference between the background color of the panel and the background color in the terminal. Can an option be added to match the panel background color instead of the document background color instead?
It is the most obvious in the light theme, but depending on the theme it can be off-putting. I agree that it is not for everyone but in my opinion it should be added as an option.
document background | panel background |
---|---|
![]() |
![]() |
![]() |
![]() |
I am a bit lost. Didn't you already change the background color?
As far as I can see the only way to currently have Terminus support both light and dark mode in ST4 is with the adaptive theme and manually calling theme generation. But then it choses an (in my opinion) suboptimal looking background color.
With "panel background color", do you mean (a) the background color of the console, or (b) the color of the panel border (which is the same color as the status bar in the Default and Default Dark themes.
For (a) it would be required to open "Widget - ThemeName.sublime-settings" if it exists, then read the "color_scheme" setting from that file (e.g. "Widget - Default.hidden-color-scheme" for the Default theme), then load that color scheme and read the value for "background" in "globals", which possibly would also require to resolve the variable, if it is a reference. Not impossible to do, but certainly very laborious. It could be hardcoded for the Default (#ffffff
) and Default Dark (hsl(215, 10%, 30%)
) themes though - but it's not a good idea as shown below.
(b) seems basically impossible to me, because it would need to calculate the color from the various "layer*.tint" and "layer*.opacity" values from the "panel_control console_panel" class in the theme, if it exists, and it could possibly also be an PNG image. Certainly no option to do this.
Anyways, both of them would probably not be very useful, because you can use the (light) Default theme with a dark color scheme or use the Default Dark theme with a light color scheme. And since the Terminus adaptive theme uses the foreground color and the other ANSI colors from the global color scheme, that might end up with colors that don't fit together, e.g. dark text on dark background etc.
I meant (b) but (a) sounds reasonable as well. Would you not agree that both the screenshots where the background color of the terminal mirrors the background color (or border color) of the panel look more polished?
I would say in your screenshots the panel background color maybe looks a tiny bit better because it allows to easily distinguish the Terminus output panel from a regular view. But on the other hand the color scheme background ensures that the foreground colors provide a sufficient contrast. As I wrote above, it just doesn't work with certain (but commonly used) situations; for example the default color scheme in ST4 is Mariana, and the default theme is the (light) Default.sublime-theme (with light OS theme). That would result in white text color on white background, and also the other colors from Mariana are meant to be used on a dark background and wouldn't look good with a white background.
I've been trying to get the adaptive theme working at all. I don't mind so much whether the background color in the terminal matches the background of the document or the panel but right now I can only manually change the terminus theme. Is it at all possible to have it change according to sublimes theme? I have looked around at the different issues here on Github regarding the adaptive theme but don't seem to understand how it is expected to work.
It works for me with the latest Terminus version (v0.3.19), and it should even instantly update in a Terminus panel when you switch through your color scheme from the menu under Preferences > Select Color Scheme. Do you maybe see any errors in the console?
Btw @Kamik423, I found a better way if you want to slightly adjust the background color of the Terminus panel (it will apply to all output panels then): Use Preferences > Customize Theme from the menu and add
{
"rules":
[
{
"class": "text_area_control",
"parents": [{"class": "panel_control output_panel"}],
"background_modifier": "lightness(- 5%)"
},
]
}
thanks @jwortmann, It does seem to be working for me now as well, in the way you describe. I'm not sure why I wasn't seeing the expected behaviour yesterday despite restarting ST and rebooting my computer.
It seems now the only 'issue' I have is in regard to switching terminus themes with my OS theme. I can see this was discussed in #296. Are there any updates in that regard?