I'm looking for a way to get the color that windows 10 chooses automatically depending on the background image as shown below.
I tried searching, and found
var color = (Color)this.Resources["SystemAccentColor"];
and
var color = (Color)Application.Current.Resources["SystemAccentColor"];
but both thew an exception
System.Exception
HResult=0x8000FFFF
Message=Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>