CSharp examples for System.Drawing:Color
Change the alpha value of a color
using System.Windows.Media; using System.Globalization; using System;//from ww w .ja v a 2s . co m public class Main{ /// <summary> /// Change the alpha value of a color /// </summary> /// <param name="c"> /// </param> /// <param name="alpha"> /// </param> /// <returns> /// </returns> public static Color ChangeAlpha(this Color c, byte alpha) { return Color.FromArgb(alpha, c.R, c.G, c.B); } }