Exemplo n.º 1
0
 /// <summary>
 /// Creates a new GRaff.Color, with the same color channels as this instance, but with the new specified opacity.
 /// </summary>
 /// <param name="opacity">The opacity of the new color. 0.0 means it is completely transparent, and 1.0 means it is completely opaque.</param>
 /// <returns>A new GRaff.Color with the same color as this instance, but with an alpha channel corresponding to the specified opacity.</returns>
 public Color Transparent(double opacity) => new Color(R, G, B, (byte)GMath.Round(255.0 * GMath.Median(0.0, opacity, 1.0)));