How do I convert solid color to color code in c#?
if (t == 2)
{
x.Foreground = new SolidColorBrush(Colors.Green);
}
I need to get value from color code like #ffeeee
instead of color name.
I have tried :
abc.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ffaacc"));
But I can't use ColorConverter
is there is any other way?