CSharp examples for System.Drawing:Color
Remove Color
using System.Drawing; using System.Text; using System.Collections.Generic; using System;//from w ww . j a va 2 s .c om public class Main{ public static Color RemoveColor(Color srcColor) { Color c = srcColor; int luma = (int)(c.R * 0.3 + c.G * 0.59 + c.B * 0.11); return Color.FromArgb(c.A, luma, luma, luma); } }