public void SetBoxColors() { System.Drawing.Color colorMin = manipulation.Hue(MinimumHue); System.Drawing.Color colorMax = manipulation.Hue(MaximumHue); Color brushColorMin = Color.FromArgb(colorMin.A, colorMin.R, colorMin.G, colorMin.B); Color brushColorMax = Color.FromArgb(colorMax.A, colorMax.R, colorMax.G, colorMax.B); Brush brushMin = new SolidColorBrush(brushColorMin); Brush brushMax = new SolidColorBrush(brushColorMax); UserControl.rectangleColorMin.Fill = brushMin; UserControl.rectangleColorMax.Fill = brushMax; }