public static System.Windows.Media.Color DarkenBy(this System.Windows.Media.Color color, int percent) { return(color.Lerp(System.Windows.Media.Colors.Black, percent / 100.0f)); //return ChangeColorBrightness(color, -1 * percent / 100.0f); }
public static System.Windows.Media.Color LightenBy(this System.Windows.Media.Color color, int percent) { return(color.Lerp(System.Windows.Media.Colors.White, percent / 100.0f)); //return ChangeColorBrightness(color, percent / 100.0f); }