settings.json should provide tab color as part of a scheme and/or profile, with an optional way to introduce variant for multiple instances of the same profile #1776

Closed
opened 2026-01-30 22:36:13 +00:00 by claunia · 14 comments
Owner

Originally created by @rbeesley on GitHub (Jun 19, 2019).

Summary of the new feature/enhancement

Profiles.json should provide tab color as part of a scheme and/or profile, with an optional way to introduce variant for multiple instances of the same profile. When a user opens different tabs today, there is very little distinction between the tabs. I'd like to have the ability to apply a color to the tab, perhaps with an alpha so that I could shade both light and dark applications with a accent color representing the type of profile used by the tab. It might be valuable to have an additional accent color which can shade the tab or a portion of the tab uniquely depending on if there are multiple instances of the same profile open, so as to distinguish between them.

Proposed technical implementation details

I'm not entirely sure how the optional portion would be implemented, so I'll address the first portion first.

{
  "profiles" :
  {
    "tabForeground" : "#aarrbbgg",
    "tabBackground" : "#aarrbbgg"
  }
}

or

{
  "profiles" :
  {
    "colorScheme" : "Foo"
  },
  "schemes" :
  [
    {
      "name" : "Foo",
      "tabForeground" : "#aarrbbgg",
      "tabBackground" : "#aarrbbgg"
    }
  ]
}

Just as with the foreground and background properties, the profile definition overrides the scheme definition. This concept could be expanded later to use other foreground and background identifiers such as images.

Originally created by @rbeesley on GitHub (Jun 19, 2019). # Summary of the new feature/enhancement Profiles.json should provide tab color as part of a scheme and/or profile, with an optional way to introduce variant for multiple instances of the same profile. When a user opens different tabs today, there is very little distinction between the tabs. I'd like to have the ability to apply a color to the tab, perhaps with an alpha so that I could shade both light and dark applications with a accent color representing the type of profile used by the tab. It might be valuable to have an additional accent color which can shade the tab or a portion of the tab uniquely depending on if there are multiple instances of the same profile open, so as to distinguish between them. # Proposed technical implementation details I'm not entirely sure how the optional portion would be implemented, so I'll address the first portion first. ```JSON { "profiles" : { "tabForeground" : "#aarrbbgg", "tabBackground" : "#aarrbbgg" } } ``` or ```JSON { "profiles" : { "colorScheme" : "Foo" }, "schemes" : [ { "name" : "Foo", "tabForeground" : "#aarrbbgg", "tabBackground" : "#aarrbbgg" } ] } ``` Just as with the foreground and background properties, the profile definition overrides the scheme definition. This concept could be expanded later to use other foreground and background identifiers such as images.
Author
Owner

@mdtauk commented on GitHub (Jun 19, 2019):

Rather than a tab colour, I would like to see the Tab use the background colour, to make the console and tab connected.

image

image

@mdtauk commented on GitHub (Jun 19, 2019): Rather than a tab colour, I would like to see the Tab use the background colour, to make the console and tab connected. ![image](https://user-images.githubusercontent.com/7389110/59804721-0fb2fd80-92e7-11e9-9cd6-7d7a242feda5.png) ![image](https://user-images.githubusercontent.com/7389110/59804746-2194a080-92e7-11e9-8ee7-cde122dceb64.png)
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 19, 2019):

I'm partial to @mdtauk's plan as well, but it does lose the nuance of "how to differentiate multiple open tabs of the same type".

@DHowett-MSFT commented on GitHub (Jun 19, 2019): I'm partial to @mdtauk's plan as well, but it does lose the nuance of "how to differentiate multiple open tabs of the same type".
Author
Owner

@mdtauk commented on GitHub (Jun 19, 2019):

I'm partial to @mdtauk's plan as well, but it does lose the nuance of "how to differentiate multiple open tabs of the same type".

Tab/Profile names. But isn't the plan to group different Terminal panes within a single Tab though? #1000

@mdtauk commented on GitHub (Jun 19, 2019): > I'm partial to @mdtauk's plan as well, but it does lose the nuance of "how to differentiate multiple open tabs of the same type". Tab/Profile names. But isn't the plan to group different Terminal panes within a single Tab though? #1000
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 19, 2019):

group different Terminal panes

Well, yes, at the user's discretion. If I want to open 600 different powershell tabs and have them all have the same title, I deserve what I get 😉

@DHowett-MSFT commented on GitHub (Jun 19, 2019): > group different Terminal panes Well, yes, at the user's discretion. If I want to open 600 different powershell _tabs_ and have them all have the same title, I deserve what I get 😉
Author
Owner

@rbeesley commented on GitHub (Jun 20, 2019):

I like mdtauk's solution, but I'd like to accent my Ubuntu tab with an orange to match the Ubuntu orange. Separately I like how this helps distinguish which tab is currently selected... so maybe what I'm suggesting only applies to the text region?

@rbeesley commented on GitHub (Jun 20, 2019): I like mdtauk's solution, but I'd like to accent my Ubuntu tab with an orange to match the Ubuntu orange. Separately I like how this helps distinguish which tab is currently selected... so maybe what I'm suggesting only applies to the text region?
Author
Owner

@mdtauk commented on GitHub (Jun 20, 2019):

Looking at the WinUI Tabs issue, there are thoughts about the design which shows the selected tab with a selected indicator strip. Perhaps that colour could be set, either on the profile or by right clicking on a tab and picking a colour?

Tab Bar

Here is a design mock-up I contributed

@mdtauk commented on GitHub (Jun 20, 2019): Looking at the WinUI Tabs issue, there are thoughts about the design which shows the selected tab with a selected indicator strip. Perhaps that colour could be set, either on the profile or by right clicking on a tab and picking a colour? ![Tab Bar](https://user-images.githubusercontent.com/7389110/59807839-7fc68100-92f1-11e9-8594-4649f38ef5a7.png) Here is a design mock-up I contributed
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 20, 2019):

cc @cinnamon-msft

@DHowett-MSFT commented on GitHub (Jun 20, 2019): cc @cinnamon-msft
Author
Owner

@cinnamon-msft commented on GitHub (Jun 21, 2019):

I made some mocks earlier on in the project to demonstrate theming and colored tabs. I like the idea of associating the tab with the background color as well. Then, having the tab go back to the original background color when it isn't selected. This could be a good way to go for v1 then expand on later 😄

Terminal (Dark) – Double Tab (+)

Terminal (Dark) – Double Tab (+) (1)

Terminal (Dark) – Double Tab (+) (2)

@cinnamon-msft commented on GitHub (Jun 21, 2019): I made some mocks earlier on in the project to demonstrate theming and colored tabs. I like the idea of associating the tab with the background color as well. Then, having the tab go back to the original background color when it isn't selected. This could be a good way to go for v1 then expand on later 😄 ![Terminal (Dark) – Double Tab (+)](https://user-images.githubusercontent.com/48369326/59939515-0f148700-940d-11e9-9828-baa1b07739ea.png) ![Terminal (Dark) – Double Tab (+) (1)](https://user-images.githubusercontent.com/48369326/59939546-28b5ce80-940d-11e9-8f50-e284c968d2d2.png) ![Terminal (Dark) – Double Tab (+) (2)](https://user-images.githubusercontent.com/48369326/59939568-3bc89e80-940d-11e9-9c3c-7a7064b21ef4.png)
Author
Owner

@Jaykul commented on GitHub (Jun 26, 2019):

This would mean if you set an image background, you have to also set the background color to control the tab, right?

Maybe if you have multiple tabs of the same type we can just randomly tweak the saturation or lightness of each one by ±10 ...

We could also expose this as settable via OSC (meaning apps could make them change)

@Jaykul commented on GitHub (Jun 26, 2019): This would mean if you set an image background, you have to also set the background color to control the tab, right? Maybe if you have multiple tabs of the same type we can just randomly tweak the saturation or lightness of each one by ±10 ... We could also expose this as settable via OSC (meaning apps could make them change)
Author
Owner

@NeilMacMullen commented on GitHub (Nov 24, 2019):

I raised #3687 before being pointed at this item. In that I suggest taking the ideas here to their logical (to me at least!) conclusion and simply allowing the entire theme to be selectable for each tab since the theme seems to be the thing that is encapsulating all UI variation.

@NeilMacMullen commented on GitHub (Nov 24, 2019): I raised #3687 before being pointed at this item. In that I suggest taking the ideas here to their logical (to me at least!) conclusion and simply allowing the entire theme to be selectable for each tab since the theme seems to be the thing that is encapsulating all UI variation.
Author
Owner

@egmontkob commented on GitHub (Nov 25, 2019):

[Jaykul] We could also expose this as settable via OSC (meaning apps could make them change)

As per j4james's suggestion, I'm copying over this comment from 3687:

Another possibility is to add support for runtime alteration of the palette and default fg+bg colors, using the standard OSC 4, 10, 11 (and their +100 counterparts) escape sequences. This would give great flexibility to users, e.g. even picking a random background color from their shell startup files.

Technical note: In VTE + GNOME Terminal we figured out the best is if the OSC sequences have precedence over the UI / config file settings. That is, for each color slot, if its value is defined via OSC 4, 10, 11 then that one is used and the one in the settings is ignored. If a value hasn't been defined via OSC, or has been reset via OSC 104, 110, 111 then the value specified in the terminal emulator's settings is used. This way re-applying the same settings is an idempotent operation. (Previously the two sources were fighting with each other, both overwriting the value in the same slot. That way re-applying the user config (e.g. "altering" a color to the same value) would invalidate a previous OSC, which was bad.)

@egmontkob commented on GitHub (Nov 25, 2019): > [Jaykul] We could also expose this as settable via OSC (meaning apps could make them change) As per j4james's suggestion, I'm copying over this comment from 3687: > Another possibility is to add support for runtime alteration of the palette and default fg+bg colors, using the standard OSC 4, 10, 11 (and their +100 counterparts) escape sequences. This would give great flexibility to users, e.g. even picking a random background color from their shell startup files. > > Technical note: In VTE + GNOME Terminal we figured out the best is if the OSC sequences have precedence over the UI / config file settings. That is, for each color slot, if its value is defined via OSC 4, 10, 11 then that one is used and the one in the settings is ignored. If a value hasn't been defined via OSC, or has been reset via OSC 104, 110, 111 then the value specified in the terminal emulator's settings is used. This way re-applying the same settings is an idempotent operation. (Previously the two sources were fighting with each other, both overwriting the value in the same slot. That way re-applying the user config (e.g. "altering" a color to the same value) would invalidate a previous OSC, which was bad.)
Author
Owner

@luzhkovvv commented on GitHub (Jul 3, 2020):

It seems that specifying tab color in profile should now be possible, after #3789 merge, with only additions to configuration? Seems to be logical next step, to allow initial per-profile configuration of existing runtime option, while using an operating system's accent/different colors within the same profile/background sync may be further steps.

@luzhkovvv commented on GitHub (Jul 3, 2020): It seems that specifying tab color in profile should now be possible, after #3789 merge, with only additions to configuration? Seems to be logical next step, to allow initial per-profile configuration of existing runtime option, while using an operating system's accent/different colors within the same profile/background sync may be further steps.
Author
Owner

@zadjii-msft commented on GitHub (Jul 6, 2020):

@luzhkovvv Sure will be, but we're tracking this as a part of #3327, which is making sure that we take care of this in a more holistic way then just adding the setting to every profile.

@zadjii-msft commented on GitHub (Jul 6, 2020): @luzhkovvv Sure will be, but we're tracking this as a part of #3327, which is making sure that we take care of this in a more holistic way then just adding the setting to every profile.
Author
Owner

@ghost commented on GitHub (Aug 26, 2020):

:tada:This issue was addressed in #7162, which has now been successfully released as Windows Terminal Preview v1.3.2382.0.🎉

Handy links:

@ghost commented on GitHub (Aug 26, 2020): :tada:This issue was addressed in #7162, which has now been successfully released as `Windows Terminal Preview v1.3.2382.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.3.2382.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1776