// Green = 255 -> 0 protected override void DrawGreen() { Graphics g = Graphics.FromImage(bmp); RGB color = new RGB(SetColor.RGB.Red, 0, SetColor.RGB.Blue); for (int i = 0; i < height; i++) { color.Green = 255 - Round(255 * (double)i / (height - 1)); g.DrawLine(new Pen(color), 0, i, width, i); } }
// Red = 0 -> 255 // Green = 255 -> 0 protected override void DrawBlue() { Graphics g = Graphics.FromImage(bmp); RGB start = new RGB(0, 0, SetColor.RGB.Blue); RGB end = new RGB(255, 0, SetColor.RGB.Blue); for (int i = 0; i < height; i++) { start.Green = end.Green = Round(255 - (255 * (double)i / (height - 1))); LinearGradientBrush brush = new LinearGradientBrush(new Rectangle(0, 0, width, 1), start.ToColor(), end.ToColor(), 0, false); g.FillRectangle(brush, new Rectangle(0, i, width, 1)); } }
public void CMYKUpdate() { this.RGB = this.CMYK; this.HSB = this.CMYK; }
public void HSBUpdate() { this.RGB = this.HSB; this.CMYK = this.HSB; }
public CMYK(Color color) { this = RGB.ToCMYK(color); }
public MyColor(Color color) { this.RGB = color; this.HSB = color; this.CMYK = color; }
public HSB(Color color) { this = RGB.ToHSB(color); }
public RGB(Color color) { this = new RGB(color.R, color.G, color.B); }