CSharp examples for System.Drawing:Color
Color To Gray
using System.Text; using System.Drawing; using System.Collections.Generic; using System;//from w w w .j a va 2 s . c o m public class Main{ public static int ToGray(this Color c) { return (int) (0.299* c.R + 0.587*c.G + 0.114*c.B) ; } }