Sublime Forum

Colorizing windows/tabs from API triggers

#1

I am a newbie sublime user evaluating it to replace our existing editor

We need the ability to change the color of single view to reflect the state of the file.

An attribute could easily be updated using the Python extensions. What I can’t figure out how to do is to make some clearly VIEW OR BUFFER SPECIFIC obvious visual change triggered by the Python API.

e.g change tab color or view background color

Any pointers where to look would be greatly appreciated. I’m thinking there must be a tag I can add to the view or buffer that will select a variant of the theme but I’m don’t see the documentation how do do that.

0 Likes

#2

I realized I could simply switch the entire color scheme rather than just a color
for the view with the following :

(from one of the documentation discussing binding a hot key to change the color)
https://www.sublimetext.com/docs/3/settings.html

view.settings().set(“color_scheme”,“Packages/Color Scheme - Default/Cobalt.tmTheme”)

This appears to be working well.

1 Like