Ghost1372

everything can be handy

ColorHelper

GetColorFromHex

1
2
var color = Application.Current.Resources["SystemAccentColor"];
var accent = ColorHelper.GetColorFromHex(color.ToString());

ColorToUInt

1
2
var colorInt = ColorHelper.ColorToUInt(Colors.Red);

GetHexFromColor

1
2
var hex = ColorHelper.GetHexFromColor(Colors.Red);

GetSolidColorBrush

1
2
var solidBrush = ColorHelper.GetSolidColorBrush(hex);

Demo

you can run demo and see this feature.

0%