Sublime Forum

Theme development: luminosity attributes for tooltips?

#1

I’m working on a theme for Sublime Text with adaptive color variants (light/dark) based on the color scheme.

Something I could not get to work yet is the foreground and background color for tooltips; tool_tip_control and tool_tip_label_control. Is it possible to use different values based on whether the global color scheme is dark or light? I’ve tried with

"parents": [{"class": "window", "attributes": ["file_light"]}]

and

"parents": [{"class": "title_bar", "attributes": ["file_light"]}]

but neither of them seem to work.


Another question: is it possible to style the placeholder text for TextInputHandlers in the command palette?

placeholder

0 Likes

#2

If anyone is interested; luminosity attributes are apparently not supported for tool tips currently. But I made a feature request for it at https://github.com/sublimehq/sublime_text/issues/4683.


For the placeholder text color in the command palette, I found that it is derived from the foreground color of the color scheme. It is possible to indirectly adjust this color from the theme by creating a “Widget - ThemeName.sublime-settings” file with a reference to a different (hidden) color scheme therein, as value for the “color_scheme” setting. In that case, it will at the same time control the appearance of the console widget too. The built-in Default theme makes use of this, for example.

0 Likes