Repository: microsoft/terminal (language: cpp)

Issue:
Command Palette key bindings are unreadable in Dark theme with light accent color
### 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.


Discussion / hints:
> 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)

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... 
> 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).
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
> **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)
 @zadjii-msft Can I try my hand with this issue?
@Random9ine always!
@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
Hey everyone, is it alright if I try taking a look at this issue?
Absolutely.

Fix patch:
diff --git a/src/cascadia/TerminalApp/CommandPalette.xaml b/src/cascadia/TerminalApp/CommandPalette.xaml
index 368de8e8250..7122a750197 100644
--- a/src/cascadia/TerminalApp/CommandPalette.xaml
+++ b/src/cascadia/TerminalApp/CommandPalette.xaml
@@ -75,6 +75,7 @@
                             HorizontalAlignment="Right"
                             VerticalAlignment="Center"
                             AutomationProperties.AccessibilityView="Raw"
+                            Background="{ThemeResource FlyoutPresenterBackground}"
                             Style="{ThemeResource KeyChordBorderStyle}"
                             Visibility="{x:Bind Item.KeyChordText, Mode=OneWay, Converter={StaticResource CommandKeyChordVisibilityConverter}}">
 


Test patch: