7
votes

Is it possible to get the current Windows 10 theme colors in UWP app with C# code?

I have found Application.RequestedTheme property but it only tells me if dark och light theme is being used, not the actual colors.

I have seen XAML markup that references theme colors but would like to know the RGB value.

1

1 Answers

9
votes

Take a look at XAML theme resources, and you can use

Application.Current.Resources["SystemAccentColor"]