All the colors that are supported in C# according : Color « 2D Graphics « C# / C Sharp

C# / C Sharp
1. 2D Graphics
2. Class Interface
3. Collections Data Structure
4. Components
5. Data Types
6. Database ADO.net
7. Design Patterns
8. Development Class
9. Event
10. File Stream
11. Generics
12. GUI Windows Form
13. Language Basics
14. LINQ
15. Network
16. Office
17. Reflection
18. Regular Expressions
19. Security
20. Services Event
21. Thread
22. Web Services
23. Windows
24. XML
25. XML LINQ
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
C# / C Sharp » 2D Graphics » ColorScreenshots 
All the colors that are supported in C# according


//ColorGuide.cs

/*
   This Program will generate all the colors that are supported in C# according 
   to the Name....
   I expected from you a better version of this program
     If you can , then inform me how you made it
   e.g. you make a dll file where the whole color array is stored then 
   your coding lines will  decrease. I tried that way but the trial was 
   in vane....
*/
using System;
using System.Windows.Forms;
using System.Drawing;
public class CreateMyPanel : Form
{  
  Color[] color = new Color[]{
                   Color.AliceBlue,    Color.AntiqueWhite,   Color.Aqua,   Color.Aquamarine,
                   Color.Azure,        Color.Beige,          Color.Bisque, Color.Black,
                   Color.BlanchedAlmond,Color.Blue,          Color.BlueViolet,Color.Brown,
                   Color.BurlyWood,    Color.CadetBlue,      Color.Chartreuse,Color.Chocolate,
                   Color.Coral,        Color.Cornsilk,Color.Crimson,
                   Color.Cyan,         Color.DarkBlue,       Color.DarkCyan,Color.DarkGoldenrod,
                   Color.DarkGray,     Color.DarkGreen,      Color.DarkKhaki,Color.DarkMagenta,
                   Color.DarkOliveGreen,Color.DarkOrange,Color.DarkOrchid,Color.DarkRed,
                   Color.DarkSalmon,Color.DarkSeaGreen,Color.DarkSlateBlue,Color.DarkSlateGray,
                   Color.DarkTurquoise,Color.DarkViolet,Color.DeepPink,Color.DeepSkyBlue,
                   Color.DimGray,Color.DodgerBlue,Color.Firebrick,Color.FloralWhite,
                   Color.ForestGreen,Color.Fuchsia,Color.Gainsboro,Color.GhostWhite,
                   Color.Gold,Color.Goldenrod,Color.Gray,Color.Green,Color.GreenYellow,
                   Color.Honeydew,Color.HotPink,Color.IndianRed,Color.Indigo,
                   Color.Ivory,Color.Khaki,Color.Lavender,Color.LavenderBlush,
                   Color.LawnGreen,Color.LemonChiffon,Color.LightBlue,Color.LightCoral,
                   Color.LightCyan,Color.LightGoldenrodYellow,Color.LightGray,
                   Color.LightGreen,Color.LightPink,Color.LightSalmon,Color.LightSeaGreen,
                   Color.LightSkyBlue,Color.LightSlateGray,Color.LightSteelBlue,
                   Color.LightYellow,Color.Lime,Color.LimeGreen,Color.Linen,
                   Color.Magenta,Color.Maroon,Color.MediumAquamarine,Color.MediumBlue,
                   Color.MediumOrchid,Color.MediumPurple,Color.MediumSeaGreen,
                   Color.MediumSlateBlue,Color.MediumSpringGreen,Color.MediumTurquoise,
                   Color.MediumVioletRed,Color.MidnightBlue,Color.MintCream,Color.MistyRose,
                   Color.Moccasin,Color.NavajoWhite,Color.Navy,Color.OldLace,
                   Color.Olive,Color.OliveDrab,Color.Orange,Color.OrangeRed,
                   Color.Orchid,Color.PaleGoldenrod,Color.PaleGreen,Color.PaleTurquoise,
                   Color.PaleVioletRed,Color.PapayaWhip,Color.PeachPuff,Color.Peru,
                   Color.Pink,Color.Plum,Color.PowderBlue,Color.Purple,Color.Red,
                   Color.RosyBrown,Color.RoyalBlue,Color.SaddleBrown,Color.Salmon,
                   Color.SandyBrown,Color.SeaGreen,Color.SeaShell,Color.Sienna,Color.Silver,
                   Color.SkyBlue,Color.SlateBlue,Color.SlateGray,Color.Snow,
                   Color.SpringGreen,Color.SteelBlue,Color.Tan,Color.Teal,
                   Color.Thistle,Color.Tomato,Color.Transparent,Color.Turquoise,
                   Color.Violet,Color.Wheat,Color.White,Color.WhiteSmoke,Color.Yellow,
                   Color.YellowGreen
                 };
  private Panel panel1 = new Panel()
  private Label[] col = new Label[140];

  public CreateMyPanel() 
  {     
    // Initialize the Panel control.
    panel1.Location = new Point(ClientRectangle.Left + 5,ClientRectangle.Top + 5);
    panel1.Size = new Size(ClientRectangle.Right-5, ClientRectangle.Bottom-5);  
    panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
    this.Controls.Add(panel1)// Add the Panel control to (inside) the form.  
    // Initalize the Label controls.  
    int ystart = ClientRectangle.Top;
    for(int j=0; j<140; j++)
      col[jnew Label();
    for(int i = 0; i<140; i++)
    {
      col[i].Size = new Size(ClientRectangle.Right, 20);  
      col[i].Font = new System.Drawing.Font("Comic Sans MS",10,FontStyle.Bold);  
      col[i].ForeColor = Color.Black;
      if(col[i].Equals(Color.Black== true)
      {
          col[i].ForeColor = Color.White;
      }
      col[i].Text = color[i].ToString();
      col[i].Location = new Point(ClientRectangle.Left,ystart);
      col[i].BackColor = color[i];
      col[i].BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;  
      panel1.Controls.Add(col[i]);  // Add the Label controls to (inside) the Panel.
      if((col[i].Location.Y > panel1.Location.Y))
      {
        panel1.AutoScroll = true;   
      }  
      ystart += 20;
    }
    this.Size = new Size(315300);
    this.Text = "A Color Guide - JAYANT";
    this.MaximizeBox = false;
//    this.BorderStyle = FormBorderStyle.FixedDialog;
    this.StartPosition = FormStartPosition.CenterScreen;
  }

  public static void Main() 
  {
    Application.Run(new CreateMyPanel());
  }
}  

/* To Compile :----
csc /r:System.dll /r:System.Drawing.dll /r:System.Windows.Forms.dll /r:Microssft.Win32.InterOp.dll /out:ColorGuide.exe Colorguide.cs
*/




           
       
Related examples in the same category
1. Transparent colorTransparent color
2. List all known color in a systemList all known color in a system
3. Draw each of 100 cells with randomly chosen colorsDraw each of 100 cells with randomly chosen colors
4. Filled with the semi transparent and transparent colorFilled with the semi transparent and transparent color
5. Color ChangerColor Changer
6. Known ColorsKnown Colors
7. Five yellow squares with different alpha values(Transparensy)
8. Create two color instances with different alpha components
9. Color.Chocolate
10. Use Color.FromArgb to create Color
11. Get all known color
w_w___w.__j_av_a__2__s_.___c_om_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.