Contrast issues in Fluent color scheme #10140
Labels
Investigate
Requires further investigation by the WPF team.
📭 waiting-author-feedback
To request more information from author.
Win 11 Theming
Description
It seems there is something fundamentally wrong with the color scheme. One example is
CardBackgroundFillColorDefault
versusCardBackgroundFillColorSecondary
.In both dark and light mode, when changing from
Default
toSecondary
, the (background) color gets darker.Consequently, when changing from
Default
toSecondary
, the contrast between text and background increases in dark mode and decreases in light mode.The consequence of this is that if we want a certain UI design to have higher contrast in both dark and light modes, we cannot use these built-in definitions, but need to define our own, theme-dependent color scheme.
Reproduction Steps
CardBackgroundFillColorDefaultBrush
and runCardBackgroundFillColorSecondaryBrush
and runCardBackgroundFillColorDefaultBrush
and runCardBackgroundFillColorSecondaryBrush
and runExpected behavior
If
Secondary
is darker thanDefault
in dark mode, thenSecondary
should lighter thanDefault
in light mode.Actual behavior
Secondary
is darker thanDefault
in both dark mode and light mode.Here follows screenshots of code and results. All examples use the same text brush,
TextFillColorSecondaryBrush
and varies border background fromDefault
toSecondary
in dark mode and then light mode.Dark mode and border background
CardBackgroundFillColorDefaultBrush
:Dark mode and border background
CardBackgroundFillColorSecondaryBrush
:Light mode and border background
CardBackgroundFillColorDefaultBrush
:Light mode and border background
CardBackgroundFillColorSecondaryBrush
:Regression?
Not really because this is the first version of the Windows 11 Theme, but I did compare to WinUI where the color definitions are different.
In WinUI there seems to be a single definition covering both light and dark modes with alpha taking care of consistency:
In WPF Fluent, light mode equals WinUI:
But the dark mode is different:
Known Workarounds
Define our own theme-dependent color scheme.
Impact
This impacts everyone developing WPF apps with Windows 11 theming leading to lower developer productivity. When contrast issues are not discovered during development and quality assurance, this leads to WPF app solution accessibility issues for end users.
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: