Skip to content

Fixes wrong accent colors #1492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Fixes wrong accent colors #1492

wants to merge 6 commits into from

Conversation

Nuklon
Copy link

@Nuklon Nuklon commented Jul 17, 2025

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

The current brushes are all wrong and don't match with WinUI:
image

Fixes: #1481

What is the new behavior?

Gets the correct brushes from Windows. I also improved the fallback colors (still not perfect, but better).

image

WinUI gallery original colors (now WPF-UI has the same colors):
image

@Nuklon Nuklon requested a review from pomianowski as a code owner July 17, 2025 17:42
@github-actions github-actions bot added themes Topic is related to managing themes styles Topic is related to styles PR Pull request dotnet release labels Jul 17, 2025
Comment on lines +337 to +344
UiApplication.Current.Resources["SystemAccentBrush"] = systemAccent.ToBrush();
UiApplication.Current.Resources["SystemFillColorAttentionBrush"] = secondaryAccent.ToBrush();
UiApplication.Current.Resources["AccentTextFillColorPrimaryBrush"] = tertiaryAccent.ToBrush();

UiApplication.Current.Resources["AccentTextFillColorPrimaryBrush"] = secondaryAccent.ToBrush();
UiApplication.Current.Resources["AccentTextFillColorSecondaryBrush"] = tertiaryAccent.ToBrush();
UiApplication.Current.Resources["AccentTextFillColorTertiaryBrush"] = secondaryAccent.ToBrush();
UiApplication.Current.Resources["AccentFillColorSelectedTextBackgroundBrush"] =
systemAccent.ToBrush();
UiApplication.Current.Resources["AccentFillColorDefaultBrush"] = secondaryAccent.ToBrush();
UiApplication.Current.Resources["AccentTextFillColorTertiaryBrush"] = primaryAccent.ToBrush();

UiApplication.Current.Resources["AccentFillColorSelectedTextBackgroundBrush"] = systemAccent.ToBrush();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -8,16 +8,16 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<!-- Colors depending on the theme should be changed by the Manager -->
<Color x:Key="SystemAccentColor">#3379d9</Color>
<Color x:Key="SystemAccentColor">#0078d4</Color>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is based on Windows' Blue default accent color.

@Nuklon Nuklon mentioned this pull request Aug 6, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet PR Pull request release styles Topic is related to styles themes Topic is related to managing themes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ApplicationAccentColorManager has different logic than Accent.xaml
1 participant