You can also specify a different color.
SolidColorBrush mySolidColorBrush = new SolidColorBrush(); mySolidColorBrush.Color = Color.FromArgb(0, 255, 244, 244); button1.Background = mySolidColorBrush;
U just need to convert the color code to Argb like this
return new SolidColorBrush( Color.FromArgb( 255, Convert.ToByte(hexaColor.Substring(1, 2), 16), Convert.ToByte(hexaColor.Substring(3, 2), 16), Convert.ToByte(hexaColor.Substring(5, 2), 16) ) );
Its very easy and correct, because you can give any color not by default, like black, orange, etc.
source share