<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2F2D_Graphics%2FColor</id>
		<title>Csharp/C Sharp/2D Graphics/Color - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2F2D_Graphics%2FColor"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/2D_Graphics/Color&amp;action=history"/>
		<updated>2026-04-30T00:15:56Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/2D_Graphics/Color&amp;diff=875&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/2D_Graphics/Color&amp;diff=875&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/2D_Graphics/Color&amp;diff=876&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/2D_Graphics/Color&amp;diff=876&amp;oldid=prev"/>
				<updated>2010-05-26T11:42:08Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==All the colors that are supported in C# according ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
//ColorGuide.cs&lt;br /&gt;
/*&lt;br /&gt;
   This Program will generate all the colors that are supported in C# according &lt;br /&gt;
   to the Name....&lt;br /&gt;
   I expected from you a better version of this program&lt;br /&gt;
     If you can , then inform me how you made it&lt;br /&gt;
   e.g. you make a dll file where the whole color array is stored then &lt;br /&gt;
   your coding lines will  decrease. I tried that way but the trial was &lt;br /&gt;
   in vane....&lt;br /&gt;
*/&lt;br /&gt;
using System;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
public class CreateMyPanel : Form&lt;br /&gt;
{  &lt;br /&gt;
  Color[] color = new Color[]{&lt;br /&gt;
                   Color.AliceBlue,    Color.AntiqueWhite,   Color.Aqua,   Color.Aquamarine,&lt;br /&gt;
                   Color.Azure,        Color.Beige,          Color.Bisque, Color.Black,&lt;br /&gt;
                   Color.BlanchedAlmond,Color.Blue,          Color.BlueViolet,Color.Brown,&lt;br /&gt;
                   Color.BurlyWood,    Color.CadetBlue,      Color.Chartreuse,Color.Chocolate,&lt;br /&gt;
                   Color.Coral,        Color.Cornsilk,Color.Crimson,&lt;br /&gt;
                   Color.Cyan,         Color.DarkBlue,       Color.DarkCyan,Color.DarkGoldenrod,&lt;br /&gt;
                   Color.DarkGray,     Color.DarkGreen,      Color.DarkKhaki,Color.DarkMagenta,&lt;br /&gt;
                   Color.DarkOliveGreen,Color.DarkOrange,Color.DarkOrchid,Color.DarkRed,&lt;br /&gt;
                   Color.DarkSalmon,Color.DarkSeaGreen,Color.DarkSlateBlue,Color.DarkSlateGray,&lt;br /&gt;
                   Color.DarkTurquoise,Color.DarkViolet,Color.DeepPink,Color.DeepSkyBlue,&lt;br /&gt;
                   Color.DimGray,Color.DodgerBlue,Color.Firebrick,Color.FloralWhite,&lt;br /&gt;
                   Color.ForestGreen,Color.Fuchsia,Color.Gainsboro,Color.GhostWhite,&lt;br /&gt;
                   Color.Gold,Color.Goldenrod,Color.Gray,Color.Green,Color.GreenYellow,&lt;br /&gt;
                   Color.Honeydew,Color.HotPink,Color.IndianRed,Color.Indigo,&lt;br /&gt;
                   Color.Ivory,Color.Khaki,Color.Lavender,Color.LavenderBlush,&lt;br /&gt;
                   Color.LawnGreen,Color.LemonChiffon,Color.LightBlue,Color.LightCoral,&lt;br /&gt;
                   Color.LightCyan,Color.LightGoldenrodYellow,Color.LightGray,&lt;br /&gt;
                   Color.LightGreen,Color.LightPink,Color.LightSalmon,Color.LightSeaGreen,&lt;br /&gt;
                   Color.LightSkyBlue,Color.LightSlateGray,Color.LightSteelBlue,&lt;br /&gt;
                   Color.LightYellow,Color.Lime,Color.LimeGreen,Color.Linen,&lt;br /&gt;
                   Color.Magenta,Color.Maroon,Color.MediumAquamarine,Color.MediumBlue,&lt;br /&gt;
                   Color.MediumOrchid,Color.MediumPurple,Color.MediumSeaGreen,&lt;br /&gt;
                   Color.MediumSlateBlue,Color.MediumSpringGreen,Color.MediumTurquoise,&lt;br /&gt;
                   Color.MediumVioletRed,Color.MidnightBlue,Color.MintCream,Color.MistyRose,&lt;br /&gt;
                   Color.Moccasin,Color.NavajoWhite,Color.Navy,Color.OldLace,&lt;br /&gt;
                   Color.Olive,Color.OliveDrab,Color.Orange,Color.OrangeRed,&lt;br /&gt;
                   Color.Orchid,Color.PaleGoldenrod,Color.PaleGreen,Color.PaleTurquoise,&lt;br /&gt;
                   Color.PaleVioletRed,Color.PapayaWhip,Color.PeachPuff,Color.Peru,&lt;br /&gt;
                   Color.Pink,Color.Plum,Color.PowderBlue,Color.Purple,Color.Red,&lt;br /&gt;
                   Color.RosyBrown,Color.RoyalBlue,Color.SaddleBrown,Color.Salmon,&lt;br /&gt;
                   Color.SandyBrown,Color.SeaGreen,Color.SeaShell,Color.Sienna,Color.Silver,&lt;br /&gt;
                   Color.SkyBlue,Color.SlateBlue,Color.SlateGray,Color.Snow,&lt;br /&gt;
                   Color.SpringGreen,Color.SteelBlue,Color.Tan,Color.Teal,&lt;br /&gt;
                   Color.Thistle,Color.Tomato,Color.Transparent,Color.Turquoise,&lt;br /&gt;
                   Color.Violet,Color.Wheat,Color.White,Color.WhiteSmoke,Color.Yellow,&lt;br /&gt;
                   Color.YellowGreen&lt;br /&gt;
                 };&lt;br /&gt;
  private Panel panel1 = new Panel(); &lt;br /&gt;
  private Label[] col = new Label[140];&lt;br /&gt;
  public CreateMyPanel() &lt;br /&gt;
  {     &lt;br /&gt;
    // Initialize the Panel control.&lt;br /&gt;
    panel1.Location = new Point(ClientRectangle.Left + 5,ClientRectangle.Top + 5);&lt;br /&gt;
    panel1.Size = new Size(ClientRectangle.Right-5, ClientRectangle.Bottom-5);  &lt;br /&gt;
    panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;&lt;br /&gt;
    this.Controls.Add(panel1); // Add the Panel control to (inside) the form.  &lt;br /&gt;
    // Initalize the Label controls.  &lt;br /&gt;
    int ystart = ClientRectangle.Top;&lt;br /&gt;
    for(int j=0; j&amp;lt;140; j++)&lt;br /&gt;
      col[j] = new Label();&lt;br /&gt;
    for(int i = 0; i&amp;lt;140; i++)&lt;br /&gt;
    {&lt;br /&gt;
      col[i].Size = new Size(ClientRectangle.Right, 20);  &lt;br /&gt;
      col[i].Font = new System.Drawing.Font(&amp;quot;Comic Sans MS&amp;quot;,10,FontStyle.Bold);  &lt;br /&gt;
      col[i].ForeColor = Color.Black;&lt;br /&gt;
      if(col[i].Equals(Color.Black) == true)&lt;br /&gt;
      {&lt;br /&gt;
          col[i].ForeColor = Color.White;&lt;br /&gt;
      }&lt;br /&gt;
      col[i].Text = color[i].ToString();&lt;br /&gt;
      col[i].Location = new Point(ClientRectangle.Left,ystart);&lt;br /&gt;
      col[i].BackColor = color[i];&lt;br /&gt;
      col[i].BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;  &lt;br /&gt;
      panel1.Controls.Add(col[i]);  // Add the Label controls to (inside) the Panel.&lt;br /&gt;
      if((col[i].Location.Y &amp;gt; panel1.Location.Y))&lt;br /&gt;
      {&lt;br /&gt;
        panel1.AutoScroll = true;   &lt;br /&gt;
      }  &lt;br /&gt;
      ystart += 20;&lt;br /&gt;
    }&lt;br /&gt;
    this.Size = new Size(315, 300);&lt;br /&gt;
    this.Text = &amp;quot;A Color Guide - JAYANT&amp;quot;;&lt;br /&gt;
    this.MaximizeBox = false;&lt;br /&gt;
//    this.BorderStyle = FormBorderStyle.FixedDialog;&lt;br /&gt;
    this.StartPosition = FormStartPosition.CenterScreen;&lt;br /&gt;
  }&lt;br /&gt;
  public static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new CreateMyPanel());&lt;br /&gt;
  }&lt;br /&gt;
}  &lt;br /&gt;
/* To Compile :----&lt;br /&gt;
csc /r:System.dll /r:System.Drawing.dll /r:System.Windows.Forms.dll /r:Microssft.Win32.InterOp.dll /out:ColorGuide.exe Colorguide.cs&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Color Changer==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
namespace ColorChanger&lt;br /&gt;
{&lt;br /&gt;
    public class ColorChanger : System.Windows.Forms.Form&lt;br /&gt;
    {&lt;br /&gt;
        internal System.Windows.Forms.Label lblSaturation;&lt;br /&gt;
        internal System.Windows.Forms.Label lblHue;&lt;br /&gt;
        internal System.Windows.Forms.Label lblBrightness;&lt;br /&gt;
        internal System.Windows.Forms.Label Label1;&lt;br /&gt;
        internal System.Windows.Forms.ListBox lstColors;&lt;br /&gt;
        private System.ruponentModel.Container components = null;&lt;br /&gt;
        public ColorChanger()&lt;br /&gt;
        {&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
        }&lt;br /&gt;
        protected override void Dispose( bool disposing )&lt;br /&gt;
        {&lt;br /&gt;
            if( disposing )&lt;br /&gt;
            {&lt;br /&gt;
                if (components != null) &lt;br /&gt;
                {&lt;br /&gt;
                    components.Dispose();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            base.Dispose( disposing );&lt;br /&gt;
        }&lt;br /&gt;
        #region Windows Form Designer generated code&lt;br /&gt;
        private void InitializeComponent()&lt;br /&gt;
        {&lt;br /&gt;
            this.lblSaturation = new System.Windows.Forms.Label();&lt;br /&gt;
            this.lblHue = new System.Windows.Forms.Label();&lt;br /&gt;
            this.lblBrightness = new System.Windows.Forms.Label();&lt;br /&gt;
            this.Label1 = new System.Windows.Forms.Label();&lt;br /&gt;
            this.lstColors = new System.Windows.Forms.ListBox();&lt;br /&gt;
            this.SuspendLayout();&lt;br /&gt;
            this.lblSaturation.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
            this.lblSaturation.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
            this.lblSaturation.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.lblSaturation.Location = new System.Drawing.Point(264, 56);&lt;br /&gt;
            this.lblSaturation.Name = &amp;quot;lblSaturation&amp;quot;;&lt;br /&gt;
            this.lblSaturation.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
            this.lblSaturation.TabIndex = 9;&lt;br /&gt;
            this.lblSaturation.Text = &amp;quot; Saturation&amp;quot;;&lt;br /&gt;
            this.lblHue.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
            this.lblHue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
            this.lblHue.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.lblHue.Location = new System.Drawing.Point(264, 32);&lt;br /&gt;
            this.lblHue.Name = &amp;quot;lblHue&amp;quot;;&lt;br /&gt;
            this.lblHue.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
            this.lblHue.TabIndex = 8;&lt;br /&gt;
            this.lblHue.Text = &amp;quot; Hue&amp;quot;;&lt;br /&gt;
            this.lblBrightness.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
            this.lblBrightness.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
            this.lblBrightness.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.lblBrightness.Location = new System.Drawing.Point(264, 8);&lt;br /&gt;
            this.lblBrightness.Name = &amp;quot;lblBrightness&amp;quot;;&lt;br /&gt;
            this.lblBrightness.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
            this.lblBrightness.TabIndex = 7;&lt;br /&gt;
            this.lblBrightness.Text = &amp;quot; Brightness&amp;quot;;&lt;br /&gt;
            this.Label1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
            this.Label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
            this.Label1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.Label1.Location = new System.Drawing.Point(8, 8);&lt;br /&gt;
            this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
            this.Label1.Size = new System.Drawing.Size(200, 20);&lt;br /&gt;
            this.Label1.TabIndex = 6;&lt;br /&gt;
            this.Label1.Text = &amp;quot; Choose a Background Color:&amp;quot;;&lt;br /&gt;
            this.lstColors.Location = new System.Drawing.Point(8, 36);&lt;br /&gt;
            this.lstColors.Name = &amp;quot;lstColors&amp;quot;;&lt;br /&gt;
            this.lstColors.Size = new System.Drawing.Size(200, 238);&lt;br /&gt;
            this.lstColors.TabIndex = 5;&lt;br /&gt;
            this.lstColors.SelectedIndexChanged += new System.EventHandler(this.lstColors_SelectedIndexChanged);&lt;br /&gt;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);&lt;br /&gt;
            this.ClientSize = new System.Drawing.Size(472, 290);&lt;br /&gt;
            this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                          this.lblSaturation,&lt;br /&gt;
                                                                          this.lblHue,&lt;br /&gt;
                                                                          this.lblBrightness,&lt;br /&gt;
                                                                          this.Label1,&lt;br /&gt;
                                                                          this.lstColors});&lt;br /&gt;
            this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));&lt;br /&gt;
            this.Name = &amp;quot;ColorChanger&amp;quot;;&lt;br /&gt;
            this.Text = &amp;quot;Color Changer&amp;quot;;&lt;br /&gt;
            this.Load += new System.EventHandler(this.ColorChanger_Load);&lt;br /&gt;
            this.ResumeLayout(false);&lt;br /&gt;
        }&lt;br /&gt;
        #endregion&lt;br /&gt;
        [STAThread]&lt;br /&gt;
        static void Main() &lt;br /&gt;
        {&lt;br /&gt;
            Application.Run(new ColorChanger());&lt;br /&gt;
        }&lt;br /&gt;
        private void ColorChanger_Load(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            string[] colorNames;&lt;br /&gt;
            colorNames = System.Enum.GetNames(typeof(KnownColor));&lt;br /&gt;
            lstColors.Items.AddRange(colorNames);&lt;br /&gt;
        }&lt;br /&gt;
        private void lstColors_SelectedIndexChanged(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            KnownColor selectedColor;&lt;br /&gt;
            selectedColor = (KnownColor)System.Enum.Parse(typeof(KnownColor), lstColors.Text);&lt;br /&gt;
            &lt;br /&gt;
            this.BackColor = System.Drawing.Color.FromKnownColor(selectedColor);&lt;br /&gt;
            &lt;br /&gt;
            lblBrightness.Text = &amp;quot;Brightness = &amp;quot; +this.BackColor.GetBrightness().ToString();&lt;br /&gt;
            lblHue.Text = &amp;quot;Hue = &amp;quot; + this.BackColor.GetHue().ToString();&lt;br /&gt;
            lblSaturation.Text = &amp;quot;Saturation = &amp;quot; + this.BackColor.GetSaturation().ToString();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Color.Chocolate==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
   &lt;br /&gt;
class PaintEvent&lt;br /&gt;
{&lt;br /&gt;
     public static void Main()&lt;br /&gt;
     {&lt;br /&gt;
          Form form   = new Form();&lt;br /&gt;
          form.Text   = &amp;quot;Paint Event&amp;quot;;&lt;br /&gt;
          form.Paint += new PaintEventHandler(MyPaintHandler);&lt;br /&gt;
   &lt;br /&gt;
          Application.Run(form);&lt;br /&gt;
     }&lt;br /&gt;
     static void MyPaintHandler(object objSender, PaintEventArgs pea)&lt;br /&gt;
     {&lt;br /&gt;
          Graphics graphics = pea.Graphics;&lt;br /&gt;
   &lt;br /&gt;
          graphics.Clear(Color.Chocolate);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Create two color instances with different alpha components==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form {&lt;br /&gt;
    protected override void OnPaint(PaintEventArgs e) {&lt;br /&gt;
        Graphics g = e.Graphics;&lt;br /&gt;
        g.FillRectangle(Brushes.White, this.ClientRectangle);&lt;br /&gt;
        Color c1 = Color.FromArgb(100, Color.Blue);&lt;br /&gt;
        Color c2 = Color.FromArgb(50, Color.Green);&lt;br /&gt;
        g.FillEllipse(Brushes.Red, 20, 20, 80, 80);&lt;br /&gt;
        g.FillRectangle(new SolidBrush(c1), 60, 80, 60, 60);&lt;br /&gt;
        Point[] pa = new Point[] {&lt;br /&gt;
                        new Point(150, 40), &lt;br /&gt;
                        new Point(90, 40), &lt;br /&gt;
                        new Point(90, 120)};&lt;br /&gt;
        g.FillPolygon(new SolidBrush(c2), pa);&lt;br /&gt;
    }&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Draw each of 100 cells with randomly chosen colors==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms; &lt;br /&gt;
public class ColorChips : Form {&lt;br /&gt;
  public ColorChips() {&lt;br /&gt;
    Size = new Size(300,300);&lt;br /&gt;
    Text = &amp;quot;Color Chips&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  protected override void OnPaint(PaintEventArgs e)   {&lt;br /&gt;
    Graphics g = e.Graphics;&lt;br /&gt;
    int h = DisplayRectangle.Height;&lt;br /&gt;
    int w = DisplayRectangle.Width;&lt;br /&gt;
    Random r = new Random();&lt;br /&gt;
    for (int i = 0; i &amp;lt; 10; i++){&lt;br /&gt;
      for (int j = 0; j &amp;lt; 10; j++) {&lt;br /&gt;
        Color color = Color.FromArgb (r.Next(256), r.Next(256), r.Next(256));&lt;br /&gt;
        Brush brush = new SolidBrush(color); &lt;br /&gt;
        g.FillRectangle(brush, i*w/10, j*h/10, w/10, h/10);&lt;br /&gt;
      } &lt;br /&gt;
    }  &lt;br /&gt;
    base.OnPaint(e);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() {&lt;br /&gt;
    Application.Run(new ColorChips());&lt;br /&gt;
  }&lt;br /&gt;
} &lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Filled with the semi transparent and transparent color==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
  using System;&lt;br /&gt;
  using System.Drawing;&lt;br /&gt;
  using System.Drawing.Drawing2D;&lt;br /&gt;
  using System.Collections;&lt;br /&gt;
  using System.ruponentModel;&lt;br /&gt;
  using System.Windows.Forms;&lt;br /&gt;
  using System.Data;&lt;br /&gt;
  public class Form1 : System.Windows.Forms.Form&lt;br /&gt;
  {&lt;br /&gt;
    public Form1()&lt;br /&gt;
    {&lt;br /&gt;
      InitializeComponent();&lt;br /&gt;
    }&lt;br /&gt;
    private void InitializeComponent()&lt;br /&gt;
    {&lt;br /&gt;
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
      this.ClientSize = new System.Drawing.Size(292, 273);&lt;br /&gt;
      this.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
      this.Resize += new System.EventHandler(this.Form1_Resize);&lt;br /&gt;
      this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);&lt;br /&gt;
    }&lt;br /&gt;
    static void Main() &lt;br /&gt;
    {&lt;br /&gt;
      Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
    private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      Graphics g = e.Graphics;&lt;br /&gt;
      g.FillRectangle(Brushes.White, this.ClientRectangle);&lt;br /&gt;
      Color c1 = Color.FromArgb(100, Color.Blue);&lt;br /&gt;
      Color c2 = Color.FromArgb(50, Color.Green);&lt;br /&gt;
      g.FillEllipse(Brushes.Red, 20, 20, 80, 80);&lt;br /&gt;
      g.FillRectangle(new SolidBrush(c1), 60, 80, 60, 60);&lt;br /&gt;
      Point[] pa = new Point[] {&lt;br /&gt;
                        new Point(150, 40), &lt;br /&gt;
                        new Point(90, 40), &lt;br /&gt;
                        new Point(90, 120)};&lt;br /&gt;
      g.FillPolygon(new SolidBrush(c2), pa);&lt;br /&gt;
    }&lt;br /&gt;
    private void Form1_Resize(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      Invalidate();&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Five yellow squares with different alpha values(Transparensy)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
public class Form1 : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new Form1());&lt;br /&gt;
  }&lt;br /&gt;
  protected override void OnPaint(PaintEventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    Graphics g;&lt;br /&gt;
    g = Graphics.FromHwnd(this.Handle);&lt;br /&gt;
    g.FillRectangle(new SolidBrush(Color.Red), 10, 10, 210, 50);&lt;br /&gt;
    // &lt;br /&gt;
    Rectangle r = new Rectangle(40, 20, 30, 30);&lt;br /&gt;
    Color c = Color.FromArgb(255, 255, 255, 0);&lt;br /&gt;
    g.FillRectangle(new SolidBrush(c), r);&lt;br /&gt;
    r.Offset(30, 0);&lt;br /&gt;
    c = Color.FromArgb(200, 255, 255, 0);&lt;br /&gt;
    g.FillRectangle(new SolidBrush(c), r);&lt;br /&gt;
    r.Offset(30, 0);&lt;br /&gt;
    c = Color.FromArgb(150, 255, 255, 0);&lt;br /&gt;
    g.FillRectangle(new SolidBrush(c), r);&lt;br /&gt;
    r.Offset(30, 0);&lt;br /&gt;
    c = Color.FromArgb(100, 255, 255, 0);&lt;br /&gt;
    g.FillRectangle(new SolidBrush(c), r);&lt;br /&gt;
    r.Offset(30, 0);&lt;br /&gt;
    c = Color.FromArgb(50, 255, 255, 0);&lt;br /&gt;
    g.FillRectangle(new SolidBrush(c), r);&lt;br /&gt;
    g.Dispose();    &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get all known color==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
public class Form1 : System.Windows.Forms.Form {&lt;br /&gt;
    ArrayList knownColorList = new ArrayList();&lt;br /&gt;
    ArrayList knownColorNameList = new ArrayList();&lt;br /&gt;
    public Form1() {&lt;br /&gt;
        NonSystemColors(knownColorList, knownColorNameList);&lt;br /&gt;
    }&lt;br /&gt;
    [STAThread]&lt;br /&gt;
    static void Main() {&lt;br /&gt;
        Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
    private void NonSystemColors(ArrayList knownColorList, ArrayList knownColorNameList) {&lt;br /&gt;
        Array cA = Enum.GetValues(typeof(KnownColor));&lt;br /&gt;
        foreach (KnownColor knwnC in cA) {&lt;br /&gt;
            Color curC = Color.FromKnownColor(knwnC);&lt;br /&gt;
            if (!curC.IsSystemColor) {&lt;br /&gt;
                knownColorList.Add(curC);&lt;br /&gt;
                knownColorNameList.Add(curC.Name.ToString());&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    protected override void OnPaint(PaintEventArgs pea) {&lt;br /&gt;
        Graphics g = pea.Graphics;&lt;br /&gt;
        int wi = 70, hi = 12, rectNb = 8;&lt;br /&gt;
        int count = knownColorList.Count;&lt;br /&gt;
        this.Width = (wi + 2) * rectNb + 9;&lt;br /&gt;
        int y = (int)(count / rectNb);&lt;br /&gt;
        this.Height = y * (2 + hi) + 60;&lt;br /&gt;
        DisplayKnownColors(g, count, wi, hi, rectNb);&lt;br /&gt;
        g.Dispose();&lt;br /&gt;
    }&lt;br /&gt;
    private void DisplayKnownColors(Graphics g, int count, int wi, int hi, int rectNb) {&lt;br /&gt;
        Rectangle rec;&lt;br /&gt;
        Pen p = new Pen(this.ForeColor);&lt;br /&gt;
        Brush b;&lt;br /&gt;
        StringFormat strfmt = new StringFormat();&lt;br /&gt;
        strfmt.LineAlignment = strfmt.Alignment = StringAlignment.Near;&lt;br /&gt;
        int x, y;&lt;br /&gt;
        for (int i = 0; i &amp;lt; count; i++) {&lt;br /&gt;
            x = (int)(i % rectNb);&lt;br /&gt;
            y = (int)(i / rectNb);&lt;br /&gt;
            rec = new Rectangle(1 + x * (2 + wi), 1 + y * (2 + hi), wi, hi);&lt;br /&gt;
            g.DrawRectangle(p, rec);&lt;br /&gt;
            b = new SolidBrush((Color)knownColorList[i]);&lt;br /&gt;
            g.FillRectangle(b, rec);&lt;br /&gt;
            b = new SolidBrush(Color.Black);&lt;br /&gt;
            g.DrawString((string)knownColorNameList[i], this.Font, b, rec, strfmt);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Known Colors==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Professional Windows GUI Programming Using C#&lt;br /&gt;
by Jay Glynn, Csaba Torok, Richard Conway, Wahid Choudhury, &lt;br /&gt;
   Zach Greenvoss, Shripad Kulkarni, Neil Whitlow&lt;br /&gt;
Publisher: Peer Information&lt;br /&gt;
ISBN: 1861007663&lt;br /&gt;
*/&lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
namespace KnownColors&lt;br /&gt;
{&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Summary description for KnownColors.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    public class KnownColors : System.Windows.Forms.Form&lt;br /&gt;
    {&lt;br /&gt;
        private System.Windows.Forms.ruboBox comboBox1;&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Required designer variable.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        private System.ruponentModel.Container components = null;&lt;br /&gt;
        ArrayList cAL;&lt;br /&gt;
        ArrayList cNAL;&lt;br /&gt;
        public KnownColors()&lt;br /&gt;
        {&lt;br /&gt;
            //&lt;br /&gt;
            // Required for Windows Form Designer support&lt;br /&gt;
            //&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
            &lt;br /&gt;
            this.Text = &amp;quot;Known non-system colors&amp;quot;;&lt;br /&gt;
            &lt;br /&gt;
            cAL = new ArrayList();      // colors&lt;br /&gt;
            cNAL = new ArrayList();      // strings&lt;br /&gt;
            NonSystemColors(cAL, cNAL);&lt;br /&gt;
            this.ruboBox1.Sorted = true;&lt;br /&gt;
            this.ruboBox1.DataSource = cNAL; //set the combo&amp;quot;s data source&lt;br /&gt;
            //&lt;br /&gt;
            // TODO: Add any constructor code after InitializeComponent call&lt;br /&gt;
            //&lt;br /&gt;
        }&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Clean up any resources being used.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        protected override void Dispose( bool disposing )&lt;br /&gt;
        {&lt;br /&gt;
            if( disposing )&lt;br /&gt;
            {&lt;br /&gt;
                if (components != null) &lt;br /&gt;
                {&lt;br /&gt;
                    components.Dispose();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            base.Dispose( disposing );&lt;br /&gt;
        }&lt;br /&gt;
        #region Windows Form Designer generated code&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Required method for Designer support - do not modify&lt;br /&gt;
        /// the contents of this method with the code editor.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        private void InitializeComponent()&lt;br /&gt;
        {&lt;br /&gt;
            this.ruboBox1 = new System.Windows.Forms.ruboBox();&lt;br /&gt;
            this.SuspendLayout();&lt;br /&gt;
            // &lt;br /&gt;
            // comboBox1&lt;br /&gt;
            // &lt;br /&gt;
            this.ruboBox1.Location = new System.Drawing.Point(8, 8);&lt;br /&gt;
            this.ruboBox1.Name = &amp;quot;comboBox1&amp;quot;;&lt;br /&gt;
            this.ruboBox1.Size = new System.Drawing.Size(121, 21);&lt;br /&gt;
            this.ruboBox1.TabIndex = 0;&lt;br /&gt;
            this.ruboBox1.Text = &amp;quot;comboBox1&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // KnownColors&lt;br /&gt;
            // &lt;br /&gt;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
            this.ClientSize = new System.Drawing.Size(292, 266);&lt;br /&gt;
            this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                          this.ruboBox1});&lt;br /&gt;
            this.Name = &amp;quot;KnownColors&amp;quot;;&lt;br /&gt;
            this.Text = &amp;quot;KnownColors&amp;quot;;&lt;br /&gt;
            this.ResumeLayout(false);&lt;br /&gt;
        }&lt;br /&gt;
        #endregion&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// The main entry point for the application.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        [STAThread]&lt;br /&gt;
        static void Main() &lt;br /&gt;
        {&lt;br /&gt;
            Application.Run(new KnownColors());&lt;br /&gt;
        }&lt;br /&gt;
        private void NonSystemColors(ArrayList cAL, ArrayList cNAL)&lt;br /&gt;
        {&lt;br /&gt;
            Array cA = Enum.GetValues(typeof(KnownColor));&lt;br /&gt;
            foreach(KnownColor knwnC in cA)  // cX.Length = 167&lt;br /&gt;
            {&lt;br /&gt;
                Color curC = Color.FromKnownColor(knwnC); &lt;br /&gt;
                if(!curC.IsSystemColor) &lt;br /&gt;
                {&lt;br /&gt;
                    cAL.Add(curC);&lt;br /&gt;
                    cNAL.Add(curC.Name.ToString());&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        protected override void OnPaint(PaintEventArgs pea)&lt;br /&gt;
        {&lt;br /&gt;
            Graphics g = pea.Graphics;&lt;br /&gt;
            int wi = 70, hi = 12, rectNb = 8; &lt;br /&gt;
            int cALNb = cAL.Count;&lt;br /&gt;
            this.Width = (wi +2)*rectNb + 9;&lt;br /&gt;
            int y = (int)(cALNb / rectNb);&lt;br /&gt;
            this.Height = y*(2 + hi) + 60;&lt;br /&gt;
            DisplayKnownColors(g, cALNb, wi, hi, rectNb);&lt;br /&gt;
            g.Dispose();&lt;br /&gt;
        }&lt;br /&gt;
        private void DisplayKnownColors(Graphics g, int cALNb, int wi, int hi, int rectNb)&lt;br /&gt;
        {&lt;br /&gt;
            Rectangle rec;&lt;br /&gt;
            Pen p = new Pen(this.ForeColor);&lt;br /&gt;
            Brush b;&lt;br /&gt;
            StringFormat strfmt = new StringFormat();&lt;br /&gt;
            strfmt.LineAlignment = strfmt.Alignment = StringAlignment.Near;&lt;br /&gt;
            int x, y;&lt;br /&gt;
            for (int i = 0; i &amp;lt; cALNb; i++)&lt;br /&gt;
            {&lt;br /&gt;
                x = (int)(i % rectNb);&lt;br /&gt;
                y = (int)(i / rectNb);&lt;br /&gt;
                rec = new Rectangle(1 + x*(2 + wi), 1 + y*(2 + hi), wi, hi);&lt;br /&gt;
                g.DrawRectangle(p, rec);&lt;br /&gt;
                b  = new SolidBrush((Color)cAL[i]);&lt;br /&gt;
                g.FillRectangle(b, rec);&lt;br /&gt;
                b  = new SolidBrush(Color.Black);&lt;br /&gt;
                g.DrawString((string)cNAL[i], this.Font, b, rec, strfmt);&lt;br /&gt;
            }&lt;br /&gt;
            x = (int)(cALNb % rectNb);&lt;br /&gt;
            y = (int)(cALNb / rectNb);&lt;br /&gt;
            this.ruboBox1.Location = new Point(x*(wi + 2) + 2, y*(2 + hi) + 2);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==List all known color in a system==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
  private System.Windows.Forms.Label lblSaturation;&lt;br /&gt;
  private System.Windows.Forms.Label lblHue;&lt;br /&gt;
  private System.Windows.Forms.Label lblBrightness;&lt;br /&gt;
  private System.Windows.Forms.Label Label1;&lt;br /&gt;
  private System.Windows.Forms.ListBox lstColors;&lt;br /&gt;
  public Form1()&lt;br /&gt;
  {&lt;br /&gt;
    InitializeComponent();&lt;br /&gt;
    string[] colorNames  = System.Enum.GetNames(typeof(KnownColor));&lt;br /&gt;
    lstColors.Items.AddRange(colorNames);&lt;br /&gt;
  }&lt;br /&gt;
  private void lstColors_SelectedIndexChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    KnownColor selectedColor = (KnownColor)System.Enum.Parse(typeof(KnownColor), lstColors.Text);&lt;br /&gt;
    this.BackColor = System.Drawing.Color.FromKnownColor(selectedColor);&lt;br /&gt;
    lblBrightness.Text = &amp;quot;Brightness = &amp;quot; + this.BackColor.GetBrightness().ToString();&lt;br /&gt;
    lblHue.Text = &amp;quot;Hue = &amp;quot; + this.BackColor.GetHue().ToString();&lt;br /&gt;
    lblSaturation.Text = &amp;quot;Saturation = &amp;quot; + this.BackColor.GetSaturation().ToString();&lt;br /&gt;
  }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.lblSaturation = new System.Windows.Forms.Label();&lt;br /&gt;
    this.lblHue = new System.Windows.Forms.Label();&lt;br /&gt;
    this.lblBrightness = new System.Windows.Forms.Label();&lt;br /&gt;
    this.Label1 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.lstColors = new System.Windows.Forms.ListBox();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // lblSaturation&lt;br /&gt;
    // &lt;br /&gt;
    this.lblSaturation.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
    this.lblSaturation.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
    this.lblSaturation.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.lblSaturation.Location = new System.Drawing.Point(268, 57);&lt;br /&gt;
    this.lblSaturation.Name = &amp;quot;lblSaturation&amp;quot;;&lt;br /&gt;
    this.lblSaturation.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
    this.lblSaturation.TabIndex = 4;&lt;br /&gt;
    this.lblSaturation.Text = &amp;quot; Saturation&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // lblHue&lt;br /&gt;
    // &lt;br /&gt;
    this.lblHue.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
    this.lblHue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
    this.lblHue.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.lblHue.Location = new System.Drawing.Point(268, 33);&lt;br /&gt;
    this.lblHue.Name = &amp;quot;lblHue&amp;quot;;&lt;br /&gt;
    this.lblHue.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
    this.lblHue.TabIndex = 3;&lt;br /&gt;
    this.lblHue.Text = &amp;quot; Hue&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // lblBrightness&lt;br /&gt;
    // &lt;br /&gt;
    this.lblBrightness.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
    this.lblBrightness.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
    this.lblBrightness.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.lblBrightness.Location = new System.Drawing.Point(268, 9);&lt;br /&gt;
    this.lblBrightness.Name = &amp;quot;lblBrightness&amp;quot;;&lt;br /&gt;
    this.lblBrightness.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
    this.lblBrightness.TabIndex = 2;&lt;br /&gt;
    this.lblBrightness.Text = &amp;quot; Brightness&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // Label1&lt;br /&gt;
    // &lt;br /&gt;
    this.Label1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
    this.Label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
    this.Label1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Label1.Location = new System.Drawing.Point(12, 9);&lt;br /&gt;
    this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Size = new System.Drawing.Size(200, 20);&lt;br /&gt;
    this.Label1.TabIndex = 0;&lt;br /&gt;
    this.Label1.Text = &amp;quot; Choose a Background Color:&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // lstColors&lt;br /&gt;
    // &lt;br /&gt;
    this.lstColors.FormattingEnabled = true;&lt;br /&gt;
    this.lstColors.Location = new System.Drawing.Point(12, 37);&lt;br /&gt;
    this.lstColors.Name = &amp;quot;lstColors&amp;quot;;&lt;br /&gt;
    this.lstColors.Size = new System.Drawing.Size(200, 238);&lt;br /&gt;
    this.lstColors.TabIndex = 1;&lt;br /&gt;
    this.lstColors.SelectedIndexChanged += new System.EventHandler(this.lstColors_SelectedIndexChanged);&lt;br /&gt;
    // &lt;br /&gt;
    // Form1&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);&lt;br /&gt;
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(430, 284);&lt;br /&gt;
    this.Controls.Add(this.lblSaturation);&lt;br /&gt;
    this.Controls.Add(this.lblHue);&lt;br /&gt;
    this.Controls.Add(this.lblBrightness);&lt;br /&gt;
    this.Controls.Add(this.Label1);&lt;br /&gt;
    this.Controls.Add(this.lstColors);&lt;br /&gt;
    this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Color Changer&amp;quot;;&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
  }&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    Application.EnableVisualStyles();&lt;br /&gt;
    Application.Run(new Form1());&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Transparent color==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
  public Form1() {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
  private void Form1_Paint(object sender, PaintEventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    Bitmap bitmap = new Bitmap(&amp;quot;winter.jpg&amp;quot;);&lt;br /&gt;
    TextureBrush brush = new TextureBrush(bitmap);&lt;br /&gt;
    e.Graphics.FillRectangle(brush, ClientRectangle);&lt;br /&gt;
        bitmap.Dispose();&lt;br /&gt;
    Color color = Color.Yellow;&lt;br /&gt;
    int penWidth = 80;&lt;br /&gt;
    Pen opaquePen = new Pen(color, penWidth);&lt;br /&gt;
    e.Graphics.DrawLine(opaquePen, 0, 50, 200, 20);&lt;br /&gt;
        opaquePen.Dispose();&lt;br /&gt;
    Color semiTransparentColor = Color.FromArgb(128, color.R, color.G, color.B);&lt;br /&gt;
    Pen semiTransparentPen = new Pen(semiTransparentColor, penWidth);&lt;br /&gt;
    e.Graphics.DrawLine(semiTransparentPen, 0, 200, 200, 140);&lt;br /&gt;
        semiTransparentPen.Dispose();&lt;br /&gt;
    Color veryTransparentColor = Color.FromArgb(77, color.R, color.G, color.B);&lt;br /&gt;
    Pen veryTransparentPen = new Pen(veryTransparentColor, penWidth);&lt;br /&gt;
    e.Graphics.DrawLine(veryTransparentPen, 0, 350, 200, 260);&lt;br /&gt;
        veryTransparentPen.Dispose();&lt;br /&gt;
  &lt;br /&gt;
    Brush transparentBrush = new SolidBrush(semiTransparentColor);&lt;br /&gt;
    e.Graphics.DrawString(&amp;quot;www.nfex.ru&amp;quot;, new Font(&amp;quot;Verdana&amp;quot;, 36, FontStyle.Bold),&lt;br /&gt;
      transparentBrush, 80, 150);&lt;br /&gt;
  }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // Form1&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);&lt;br /&gt;
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(292, 266);&lt;br /&gt;
    this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Alpha Blending&amp;quot;;&lt;br /&gt;
    this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    Application.EnableVisualStyles();&lt;br /&gt;
    Application.Run(new Form1());&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Use Color.FromArgb to create Color==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
   &lt;br /&gt;
class RandomClear: Form &lt;br /&gt;
{&lt;br /&gt;
     public static void Main()&lt;br /&gt;
     {&lt;br /&gt;
          Application.Run(new RandomClear());&lt;br /&gt;
     }&lt;br /&gt;
     public RandomClear()      &lt;br /&gt;
     {&lt;br /&gt;
          Text = &amp;quot;Random Clear&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     protected override void OnPaint(PaintEventArgs pea)&lt;br /&gt;
     {&lt;br /&gt;
          Graphics graphics = pea.Graphics;&lt;br /&gt;
          Random   rand = new Random();&lt;br /&gt;
   &lt;br /&gt;
          graphics.Clear(Color.FromArgb(rand.Next(256),&lt;br /&gt;
                                    rand.Next(256),&lt;br /&gt;
                                    rand.Next(256)));&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>