public static SolidColorBrush MakeDarker(this SolidColorBrush brush, double darknessDelta) { Color color = brush.Color; HsbColor hsbColor = HsbColor.FromArgb(color); hsbColor.Brightness -= darknessDelta; SolidColorBrush result = new SolidColorBrush(hsbColor.ToArgb()); return(result); }
public static HsbColor ToHsbColor(this Color color) { return(HsbColor.FromArgb(color)); }