GetColorFromHex
1 | var color = Application.Current.Resources["SystemAccentColor"]; |
ColorToUInt
1 | var colorInt = ColorHelper.ColorToUInt(Colors.Red); |
GetHexFromColor
1 | var hex = ColorHelper.GetHexFromColor(Colors.Red); |
GetSolidColorBrush
1 | var solidBrush = ColorHelper.GetSolidColorBrush(hex); |
Demo
you can run demo and see this feature.