Hi how to set R G B values in System.Drawing.Color.G ?
R G B
System.Drawing.Color.G
which is like System.Drawing.Color.G=255; is not allowed because its read o
System.Drawing.Color.G=255;
You can make extension to just change one color component
static class ColorExtension { public static Color ChangeG(Color this color,byte g) { return Color.FromArgb(color.A,color.R,g,color.B); } }
then you can use this:
yourColor = yourColor.ChangeG(100);