public static string ColorRgbDarken(string hex) { MudColor Color = ColorManager.FromHex(hex); Color = ColorManager.ColorDarken(Color, 0.075); return($"rgb({Color.R},{Color.G},{Color.B})"); }
public static string ColorRgbDarken(string hex) { var color = ColorManager.FromHex(hex); color = ColorManager.ColorDarken(color, 0.075); return($"rgb({color.R},{color.G},{color.B})"); }
public string BuildColor(string Hex, ColorOption ColorOption, [Optional] double alpha, [Optional] int changevalue) { string CssVar = ""; int ChangeValue = 25; if (changevalue != 0) { ChangeValue = changevalue; } MudColor Color = ColorManager.FromHex(Hex); switch (ColorOption) { case ColorOption.Rgb: CssVar = $"rgb({Color.R},{Color.G},{Color.B})"; break; case ColorOption.RgbA: string Alpha = alpha.ToString("G", CultureInfo.InvariantCulture); CssVar = $"rgba({Color.R},{Color.G},{Color.B}, {Alpha})"; break; case ColorOption.Lighten: Color = ColorManager.ColorLighten(Color, ChangeValue); CssVar = $"rgb({Color.R},{Color.G},{Color.B})"; break; case ColorOption.Darken: Color = ColorManager.ColorDarken(Color, ChangeValue); CssVar = $"rgb({Color.R},{Color.G},{Color.B})"; break; } return(CssVar); }
public MudColor Darken(MudColor color) { return(ColorManager.ColorDarken(color)); }