Command Palette key bindings are unreadable in Dark theme with light accent color #19761

Closed
opened 2026-01-31 06:52:53 +00:00 by claunia · 12 comments
Owner

Originally created by @Molkree on GitHub (Apr 23, 2023).

Windows Terminal version

1.16.10261.0

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

  1. Set the Terminal theme to dark.
  2. Enable "Automatically pick an accent colour from my background" in Windows settings. This image should do the trick. Or set it manually to Turquoise (41, 190, 204; #29BECC).
  3. Open Command Palette.
  4. Navigate to some entry with key binding.
    image

Key binding colours don't change in the Light theme too so maybe someone can find such accent colour so that it also becomes unreadable, not sure:
image

This is a bit similar to #6892 (my accent colour is almost the same! 😄)

Expected Behavior

Key bindings' colour gets inverted if needed as action text colour does.

Actual Behavior

Key bindings' colour doesn't change depending on the selection background colour.

Originally created by @Molkree on GitHub (Apr 23, 2023). ### Windows Terminal version 1.16.10261.0 ### Windows build number 10.0.19045.0 ### Other Software _No response_ ### Steps to reproduce 1. Set the Terminal theme to dark. 2. Enable "Automatically pick an accent colour from my background" in Windows settings. [This image](https://img-cdn-us.gamespress.com/files/BlizzardLive/2022/11/151725-181794e6/3840x2160_Ysera.png?sv=2018-03-28&sr=b&sig=gHfRiqc5Oae6XQv2PmkH%2BswuvL6pf2i9rxmSfBhNSfY%3D&se=2023-06-01T02%3A00%3A00Z&sp=r&rsct=application%2Foctet-strem&rscd=attachment&lightbox=y&ex=2023-06-01+03%3A00%3A00&sky=1bff96434c9f78c24162aed8f2a8cdda110ec98e5ab42deaf9bdf273b40eee89) should do the trick. Or set it manually to Turquoise (41, 190, 204; #29BECC). 3. Open Command Palette. 4. Navigate to some entry with key binding. ![image](https://user-images.githubusercontent.com/12860284/233868291-c5248e0b-8812-49d0-a9f8-f88b92276b04.png) Key binding colours don't change in the Light theme too so maybe someone can find such accent colour so that it also becomes unreadable, not sure: ![image](https://user-images.githubusercontent.com/12860284/233868332-5b32cdb7-fad2-46ee-9f8d-2385c11eaf07.png) This is a bit similar to #6892 (my accent colour is almost the same! 😄) ### Expected Behavior Key bindings' colour gets inverted if needed as action text colour does. ### Actual Behavior Key bindings' colour doesn't change depending on the selection background colour.
Author
Owner

@237dmitry commented on GitHub (Apr 26, 2023):

Key bindings' colour doesn't change depending on the selection background colour.

Yes, but keybindings are visible:

Screenshot 2023-04-26 171806

@237dmitry commented on GitHub (Apr 26, 2023): > Key bindings' colour doesn't change depending on the selection background colour. Yes, but keybindings are visible: ![Screenshot 2023-04-26 171806](https://user-images.githubusercontent.com/78153320/234607862-a513a77d-ffc2-4e0e-ade5-b0f09cfbab61.png)
Author
Owner

@zadjii-msft commented on GitHub (Apr 26, 2023):

Is there a secret step 0 here that's "set the OS to High Contrast Mode"?

This might be tricky. I wonder if there's a brush that's better for "text on top of the accent color", that we could set with like, a VisualState or something, only in HC mode...

@zadjii-msft commented on GitHub (Apr 26, 2023): Is there a secret step 0 here that's "set the OS to High Contrast Mode"? This might be tricky. I wonder if there's a brush that's better for "text on top of the accent color", that we could set with like, a VisualState or something, only in HC mode...
Author
Owner

@Molkree commented on GitHub (Apr 26, 2023):

keybindings are visible

@237dmitry, hm, my UI looks different, as you can see in the screenshots above (you only have accent colour as a short strip on the left and for me the whole background of selection changes). Is there a setting that controls this? I can't find anything obvious on the Appearance page of the settings. Are you on the same version of Terminal? Windows 10?

Is there a secret step 0 here that's "set the OS to High Contrast Mode"?

@zadjii-msft, I don't have High Contrast enabled in Windows (I have just checked it).

@Molkree commented on GitHub (Apr 26, 2023): > keybindings are visible @237dmitry, hm, my UI looks different, as you can see in the screenshots above (you only have accent colour as a short strip on the left and for me the whole background of selection changes). Is there a setting that controls this? I can't find anything obvious on the Appearance page of the settings. Are you on the same version of Terminal? Windows 10? > Is there a secret step 0 here that's "set the OS to High Contrast Mode"? @zadjii-msft, I don't have High Contrast enabled in Windows (I have just checked it).
Author
Owner

@zadjii-msft commented on GitHub (Apr 26, 2023):

INTERESTING.

Looks like ListView itself changed in Windows 11:

image

Left is a Win10 VM, and right is on Win11.

I would have assumed that just saying we were using Controlsv2 would have applied there as well (even on Windows 10), but perhaps there's something about the new style that isn't supported on windows 10.

I dunno what to do about this. I don't really want to try and have a conditional hack for "Only on Windows 10, do we also want to apply this other VisualStateGroup to the Command Palette items". That sounds tricky to do right in XAML, or annoying in codebehind. But I also don't know how to get the Win11 styles to work on Win10. Hmmm

@zadjii-msft commented on GitHub (Apr 26, 2023): INTERESTING. Looks like _ListView itself changed in Windows 11_: ![image](https://user-images.githubusercontent.com/18356694/234626617-550288a7-5d08-45e6-b068-06274dff39df.png) Left is a Win10 VM, and right is on Win11. I would have assumed that just saying we were using Controlsv2 would have applied there as well (even on Windows 10), but perhaps there's something about the new style that isn't supported on windows 10. I dunno what to do about this. I don't _really_ want to try and have a conditional hack for "Only on Windows 10, do we also want to apply this other VisualStateGroup to the Command Palette items". That sounds tricky to do right in XAML, or annoying in codebehind. But I also don't know how to get the Win11 styles to work on Win10. Hmmm
Author
Owner

@zadjii-msft commented on GitHub (Apr 26, 2023):

Note

Walkthrough

Probably the easiest way to do this would be to just add a .Background() to this border:
ca5834e922/src/cascadia/TerminalApp/CommandPalette.xaml (L73-L79)
and use like, the CommandPalette background there, so that it appears transparent, but actually isn't.

(this was an off the cuff suggestion during triage, and we all thought it was a good idea)

@zadjii-msft commented on GitHub (Apr 26, 2023): > **Note** > ## Walkthrough Probably the easiest way to do this would be to just add a `.Background()` to this border: https://github.com/microsoft/terminal/blob/ca5834e922e7b8438a8a3cb4bd07aca22a897e9d/src/cascadia/TerminalApp/CommandPalette.xaml#L73-L79 and use like, the CommandPalette background there, so that it appears transparent, but actually isn't. (this was an off the cuff suggestion during triage, and we all thought it was a good idea)
Author
Owner

@Random9ine commented on GitHub (Jun 21, 2023):

@zadjii-msft Can I try my hand with this issue?

@Random9ine commented on GitHub (Jun 21, 2023): @zadjii-msft Can I try my hand with this issue?
Author
Owner

@zadjii-msft commented on GitHub (Jun 21, 2023):

@Random9ine always!

@zadjii-msft commented on GitHub (Jun 21, 2023): @Random9ine always!
Author
Owner

@Random9ine commented on GitHub (Jun 22, 2023):

@zadjii-msft Unfortunately away from my desktop for the summer and didn't realize there's no way to run Win10 VMs on M1 MBP anymore. Don't think I'll be able to get to this for awhile

@Random9ine commented on GitHub (Jun 22, 2023): @zadjii-msft Unfortunately away from my desktop for the summer and didn't realize there's no way to run Win10 VMs on M1 MBP anymore. Don't think I'll be able to get to this for awhile
Author
Owner

@RickleAndMortimer commented on GitHub (Jun 29, 2023):

Hey everyone, is it alright if I try taking a look at this issue?

@RickleAndMortimer commented on GitHub (Jun 29, 2023): Hey everyone, is it alright if I try taking a look at this issue?
Author
Owner

@DHowett commented on GitHub (Jun 29, 2023):

Absolutely.

@DHowett commented on GitHub (Jun 29, 2023): Absolutely.
Author
Owner

@RanjanTheDoer commented on GitHub (Aug 9, 2023):

Hey is this issue fixed? If not I would like to work on it. please assign me

@RanjanTheDoer commented on GitHub (Aug 9, 2023): Hey is this issue fixed? If not I would like to work on it. please assign me
Author
Owner

@zadjii-msft commented on GitHub (Aug 9, 2023):

Oh, huh. It looks like this was merged after all! Looks like this merged in #15677, but we never looped back and linked this PR to it! Sorry about that 😕

@zadjii-msft commented on GitHub (Aug 9, 2023): Oh, huh. It looks like this was merged after all! Looks like this merged in #15677, but we never looped back and linked this PR to it! Sorry about that 😕
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19761