You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Light theme SystemColor* resources hold HighContrast values #24437
In src/Uno.UI/UI/Xaml/Style/Generic/SystemResources.xaml, the Light theme dictionary carries HighContrast
values for the SystemColor* keys instead of light-theme ones:
Key
Default (correct)
Light (currently)
HighContrast
SystemColorWindowColor
#FFFFFFFF
#FF000000
#FF000000
SystemColorButtonFaceColor
#FFF0F0F0
#FF000000
#FF000000
SystemColorButtonTextColor
#FF000000
#FFFFFFFF
#FFFFFFFF
SystemColorGrayTextColor
#FF6D6D6D
#FF3FF23F
#FF3FF23F
SystemColorHighlightColor
#FF3399FF
#FF1AEBFF
#FF1AEBFF
SystemColorHotlightColor
#FF0066CC
#FFFFFF00
#FFFFFF00
The Light column is a copy of the HighContrast one. A green "gray text" and a yellow hotlight colour in the light
theme are not plausible values.
Separately, in the HighContrast dictionary SystemColorWindowColor and SystemColorWindowTextColor are both #FF000000 — black text on a black window. SystemColorWindowTextColor should be #FFFFFFFF there.
This is long-standing (it predates the current SystemResources.xaml), and it is only visible to code that resolves
these keys directly rather than through the SystemControl* brushes, which is why it has gone unnoticed.
Expected behavior 🎯
The Light dictionary should carry the same system colours as Default, and HighContrast's WindowTextColor should
contrast with its WindowColor.
How to reproduce it (as minimally and precisely as possible) 🔬
or read Application.Current.Resources["SystemColorGrayTextColor"] under an explicit Light theme.
Workaround 🛠️
Override the affected keys in the app's own Light theme dictionary.
Renderer 🎨
Skia
Affected platforms 📱💻🖥️
All platforms 🌍
Anything else we need to know? 💬
Spotted while reviewing #21513, which rewrites SystemResources.xaml and carries these values over verbatim. Fixing
them is a visual change in its own right, so it is deliberately kept out of that PR.
Details from duplicate #25021 that are not in this issue yet:
ResourceResolver.UpdateSystemColorAndBrushResources only rewrites the HighContrast dictionaries, so the Light placeholders are never corrected at runtime.
Also affected: SystemColorHighlightTextColor (#FF000000 in Light).
Real-world repro via WinUI keys: RadioButtonContentPointerOverForegroundThemeBrush maps to SystemColorHighlightTextColor (WinUI generic.xaml, Light dictionary) and comes out black in the Light theme.
Activity
MartinZikmund commentedon Oct 14, 2026
Details from duplicate #25021 that are not in this issue yet:
ResourceResolver.UpdateSystemColorAndBrushResourcesonly rewrites the HighContrast dictionaries, so the Light placeholders are never corrected at runtime.SystemColorHighlightTextColor(#FF000000in Light).RadioButtonContentPointerOverForegroundThemeBrushmaps toSystemColorHighlightTextColor(WinUI generic.xaml, Light dictionary) and comes out black in the Light theme.Generic.xamlresources with WinUI styles #21513.