Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Wpf.Ui/Appearance/ApplicationAccentColorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/// <summary>
/// The maximum value of the background HSV brightness after which the text on the accent will be turned dark.
/// </summary>
private const double BackgroundBrightnessThresholdValue = 80d;

Check warning on line 55 in src/Wpf.Ui/Appearance/ApplicationAccentColorManager.cs

View workflow job for this annotation

GitHub Actions / build


/// <summary>
/// Gets the SystemAccentColor.
Expand Down Expand Up @@ -170,6 +170,7 @@
systemAccent = systemAccent.UpdateBrightness(6f);
}

bool isSystemAccent = systemAccent == GetColorizationColor();
Color primaryAccent;
Color secondaryAccent;
Color tertiaryAccent;
Expand All @@ -191,7 +192,7 @@

Color GetColor(UIColorType colorType, float brightnessFactor, float saturationFactor = 0.0f)
{
if (GetUiColor(colorType) is { } color)
if (isSystemAccent && GetUiColor(colorType) is { } color)
{
return color;
}
Expand Down
Loading