Sublime Forum

Hot to change active tab title color

#1

Hi everybody, i´m a newer, i was trying to to customize my favourite color scheme (blackboard) and put the active tab title color to yellow to see quicky the opened tab, but i haven´t been able to do it, i see no parameter in the blackboard theme file,

Any idea where am i can change this setting?

thanks a lot!!

0 Likes

Changing tab color in Sublime Text 3
#2

You might want to try out the Phoenix theme…it has lots of options for coloring the tabs:
github.com/netatoo/phoenix-theme

Even if you decide not to use it, you should be able to look into the theme definition to find out how it is being done (the .sublime-theme file is reasonably well documented).

0 Likes

#3

Add to Settings

"highlight_modified_tabs": true,
Add to theme

[code] {
“class”: “tab_control”,
“settings”: “highlight_modified_tabs”],
“attributes”: “dirty”],
“layer0.texture”: “Theme - Nil/assets/dark/tabs/tab-inactive-modified.png”,
“layer1.texture”: “Theme - Nil/assets/dark/tabs/tab-hover-dirty.png”
},
{
“class”: “tab_control”,
“settings”: “highlight_modified_tabs”],
“attributes”: “dirty”, “selected”],
“layer0.texture”: “Theme - Nil/assets/dark/tabs/tab-active-modified.png”
},
// - Dirty inactive tab label
{
“class”: “tab_label”,
“parents”: {“class”: “tab_control”, “attributes”: “dirty”]}],
“settings”: “highlight_modified_tabs”],
“fg”: [192,192,192]
},

// - Dirty active tab label
{
	"class": "tab_label",
	"parents": {"class": "tab_control", "attributes": "selected", "dirty"]}],
	"settings": "highlight_modified_tabs"],
	"fg": [192,192,192]
},[/code]
0 Likes

#4

Thanks a lot guys!
i´ll try those options! xD

0 Likes

#5

Where can I find the complete documentation for all these theme settings?

0 Likes

#6

Hi,

Could somebody please help me how to solve this issue in the new version? I have Sublime Text build 4143 and I already try everything that I found on the web.

Here is my current state:
230330131647

I Would like to change color of the changed file tab (in my case is a green dot and a green line under tab).

How can I change those colors?

I have already tried in:

“MySettings.sublime-color-scheme”, (I use my own color scheme)
“MySettings.sublime-theme”, (I use my own file that “extends”: “Default.sublime-theme”,)
“Package Control.sublime-settings”
“Preferences.sublime-settings”.

I think the answer lies in “MySettings.sublime-theme” file, but I don’t know the syntax to correct it.

Any useful information will be greatly appreciated.

0 Likes

#7

The Default.sublime-theme uses the var(--accent) color from the color scheme for the highlighting indicator of modified tabs. So you could change this color from your color scheme, for example

{
    "globals": {
        "accent": "magenta"
    }
}

This might potentially also impact some other aspects of the UI, for example if third-party packages use this color for things like popups or so.
If you want to avoid that, and enforce the color directly via the theme, you could add a rule like

{
    "rules":
    [
        {
            "class": "tab_control",
            "attributes": ["dirty", "!added", "!deleted"],
            "settings": {
                "file_tab_style": ["", "rounded", "square"],
                "highlight_modified_tabs": true
            },
            "layer2.tint": "magenta"
        }
    ]
}

into your theme. That should effect only the horizontal bar of the modified tabs, and I haven’t checked what exact rule is needed for the close button. And also the theme rules can get a bit complex with all the different states (selected, highlighted, etc.), so if you want to tweak them perfectly, you will need to read the theme docs and experiment with that yourself.

Edit: And by the way, your screenshot shows the color for “added” (i.e. newly created) tabs, without a file on disk. The Default theme uses "file_tab_highlight_new_tint": "var(--greenish)" in the theme varibles for this.

0 Likes

#8

Thanks for your reply, but unfortunately it doesn’t work for me. Maybe is problem in Sublime Text build 4143 or somewhere else in my user config files.

And by the way in my case “globals” and “rules” are located in My.sublime-colors-scheme not in “.sublime-theme” as you mentioned.

0 Likes

#9

The reference above was to a color scheme:

What this means is, the default application theme uses a color variable named accent that comes from the color scheme to know what color to use, so applying it in the color scheme (with example provided) is a way to alter the color so that the theme will display the color you want.

The second example is an example of a theme override that alters the color directly rather than using the accent color from the color scheme.

2 Likes