Sublime Forum

Dynamically change tab color



I use Sublime projects a lot. It is not rare that sometimes I open a file of another project. In such cases I would like to dynamically change the tab color so that I can immediately recognize that the file does not belong to the current project.

Is this possible via the API? It seems to me that themes can only be altered via static files (not dynamically).



The tab color (and the background of the content as a whole) comes from the color scheme that you’re using, so while you can’t do this with themes you CAN do it with a series of color schemes.

An example of doing this, including a link to a plugin that does this the video linked below. The plugin is intended to hit files that match a particular regex by name or path, so it’s slightly outside the use case to use it for finding files that DON’T match a particular regex, but something like should be easy enough to add.

For that you’d want to do this only in project specific settings.



Thank you Terence. I think I saw 2/3 of the videos on your YT channel but I missed this one (most likely because it was theme-related). :slight_smile:

1 Like