Too little contrast in progress indicator of inactive tab in light theme #21904

Open
opened 2026-01-31 07:57:56 +00:00 by claunia · 6 comments
Owner

Originally created by @KalleOlaviNiemitalo on GitHub (Jun 27, 2024).

Windows Terminal version

1.20.11381.0

Windows build number

10.0.19045.4529

Other Software

No response

Steps to reproduce

Configure the terminal to use the light theme (not legacy), and a tab bar separate from the title bar.
Open a PowerShell tab and run a command to output the OSC that sets 50% progress: "`e]9;4;1;50`e\"
Do the same in another tab.

Expected Behavior

The progress indicators in the tab bar should have good contrast so that I can see how much progress has been made.

Actual Behavior

The progress indicator of the inactive tab is too light and doesn't have enough contrast to the light background:
image

Compare to the dark theme, where both progress indicators have adequate contrast:
image

Originally created by @KalleOlaviNiemitalo on GitHub (Jun 27, 2024). ### Windows Terminal version 1.20.11381.0 ### Windows build number 10.0.19045.4529 ### Other Software _No response_ ### Steps to reproduce Configure the terminal to use the light theme (not legacy), and a tab bar separate from the title bar. Open a PowerShell tab and run a command to output the OSC that sets 50% progress: ``"`e]9;4;1;50`e\"`` Do the same in another tab. ### Expected Behavior The progress indicators in the tab bar should have good contrast so that I can see how much progress has been made. ### Actual Behavior The progress indicator of the inactive tab is too light and doesn't have enough contrast to the light background: ![image](https://github.com/microsoft/terminal/assets/46201428/5e68fa33-16fc-44ea-8a8c-c61c0884af3a) Compare to the dark theme, where both progress indicators have adequate contrast: ![image](https://github.com/microsoft/terminal/assets/46201428/407b68f2-fb8c-474c-80e0-6ab7bddbcb51)
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jun 27, 2024):

Huh, it seems the color of the progress indicator is coming from the highlight color in the Windows personalization settings…

image

image

That seems unreasonable to me; Terminal can't expect that color to have good contrast against both light and dark backgrounds.

@KalleOlaviNiemitalo commented on GitHub (Jun 27, 2024): Huh, it seems the color of the progress indicator is coming from the highlight color in the Windows personalization settings… ![image](https://github.com/microsoft/terminal/assets/46201428/6d0d8471-aba8-4034-8799-022da760f019) ![image](https://github.com/microsoft/terminal/assets/46201428/47fc28a6-e615-4cfb-899d-093203ae0634) That seems unreasonable to me; Terminal can't expect that color to have good contrast against both light and dark backgrounds.
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jun 27, 2024):

AFAICT, the Terminal doesn't configure the color of the progress ring: https://github.com/microsoft/terminal/blob/27fff2c1a3e94a4257d8a8b61ad69318fbf36a92/src/cascadia/TerminalApp/TabHeaderControl.xaml#L18-L27

So… should I blame Microsoft.UI.Xaml, or is the Terminal violating some MUX guideline about background colors behind the progress ring control?

@KalleOlaviNiemitalo commented on GitHub (Jun 27, 2024): AFAICT, the Terminal doesn't configure the color of the progress ring: <https://github.com/microsoft/terminal/blob/27fff2c1a3e94a4257d8a8b61ad69318fbf36a92/src/cascadia/TerminalApp/TabHeaderControl.xaml#L18-L27> So… should I blame Microsoft.UI.Xaml, or is the Terminal violating some MUX guideline about background colors behind the progress ring control?
Author
Owner

@zadjii-msft commented on GitHub (Jul 10, 2024):

I have this gut feeling that this was fixed in Windows 11:
image
image
image

I bet the accent color logic got updated to be smarter in Win11

@zadjii-msft commented on GitHub (Jul 10, 2024): I have this gut feeling that this was fixed in Windows 11: ![image](https://github.com/microsoft/terminal/assets/18356694/ae28cea3-6d04-49e2-8e0f-6fca789d0f05) ![image](https://github.com/microsoft/terminal/assets/18356694/511c62e5-e409-4e1a-a812-f1c94d8cb4d6) ![image](https://github.com/microsoft/terminal/assets/18356694/a3f54283-b1a0-40d0-8eb2-e14ff324b31c) I bet the accent color logic got updated to be smarter in Win11
Author
Owner

@zadjii-msft commented on GitHub (Jul 15, 2024):

Yea, it looks like there was a lot of work in this area in Windows 11. Clearly these aren't all publicly accessible issue threads, but there is a lot of discussion in the win11 timeframe about accent colors:

I'm guessing that a backport to Win10 is highly unlikely. I have no idea how challenging this would be to workaround - possibly prohibitively hard. I don't think WinUI 2 lets us easily restyle the progress ring.

@zadjii-msft commented on GitHub (Jul 15, 2024): Yea, it looks like there was a lot of work in this area in Windows 11. Clearly these aren't all publicly accessible issue threads, but there is a lot of discussion in the win11 timeframe about accent colors: * MSFT:25681566 * MSFT:30833850 * MSFT:26006362 * https://github.com/microsoft/microsoft-ui-xaml/issues/2354 I'm guessing that a backport to Win10 is highly unlikely. I have no idea how challenging this would be to workaround - possibly prohibitively hard. I don't think WinUI 2 lets us easily restyle the progress ring.
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jul 16, 2024):

The last two screen shots in https://github.com/microsoft/terminal/issues/17475#issuecomment-2221600398 look like they are from WinUI Gallery and you have switched between dark and light theme. AFAICT, WinUI 3 chooses the default foreground color of the progress ring based on the theme, like this:

  • Light theme: ProgressRingForegroundThemeBrush = AccentFillColorDefaultBrush = SystemAccentColorDark1
  • Default theme: ProgressRingForegroundThemeBrush = AccentFillColorDefaultBrush = SystemAccentColorLight2
  • HighContrast theme: ProgressRingForegroundThemeBrush = SystemControlHighlightAccentBrush

and the background color of the tab header does not affect that choice. So upgrading to WinUI 3 would not fix this bug; it would just make it possible for Terminal to set the foreground color of the progress ring, and TabBase::_ApplyTabColorOnUIThread would then have to be changed to set that, like it already sets the text color.

I guess it would be possible to copy the WinUI 3 ProgressRing implementation into Terminal and port it to WinUI 2, but that would increase the size of the binary package and complicate future maintenance.

@KalleOlaviNiemitalo commented on GitHub (Jul 16, 2024): The last two screen shots in <https://github.com/microsoft/terminal/issues/17475#issuecomment-2221600398> look like they are from WinUI Gallery and you have switched between dark and light theme. AFAICT, WinUI 3 chooses the default foreground color of the progress ring based on the theme, like this: * Light theme: ProgressRingForegroundThemeBrush = AccentFillColorDefaultBrush = SystemAccentColorDark1 * Default theme: ProgressRingForegroundThemeBrush = AccentFillColorDefaultBrush = SystemAccentColorLight2 * HighContrast theme: ProgressRingForegroundThemeBrush = SystemControlHighlightAccentBrush and the background color of the tab header does not affect that choice. So upgrading to WinUI 3 would not fix this bug; it would just make it possible for Terminal to set the foreground color of the progress ring, and TabBase::\_ApplyTabColorOnUIThread would then have to be changed to set that, like it already sets the text color. I guess it would be possible to copy the WinUI 3 ProgressRing implementation into Terminal and port it to WinUI 2, but that would increase the size of the binary package and complicate future maintenance.
Author
Owner

@zadjii-msft commented on GitHub (Jul 17, 2024):

FWIW, I was using the WinUI 2 gallery for those screenshots 😉


I'm thinking:

  • we've already got code that checks what the evaluated color of a tab is
  • we've got code to swap out the resources in the tab
  • presumably, we can swap out those resource for the progress ring too?
  • so theoretically if someone has a light tab (either light theme or a dark theme + white titlebar) we can always manually replace it with the dark accent color (and vice versa)
@zadjii-msft commented on GitHub (Jul 17, 2024): FWIW, I was using the WinUI 2 gallery for those screenshots 😉 ---- I'm thinking: * we've already got code that checks what the _evaluated_ color of a tab is * we've got code to swap out the resources in the tab * presumably, we can swap out those resource for the progress ring too? * so theoretically if someone has a light tab (either light theme or a dark theme + white titlebar) we can always manually replace it with the dark accent color (and vice versa)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21904