这是使用如下的代码画出来的:
private void panel1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{ int StartPosition=0; for(int i=1;i<0xa7;i++) { e.Graphics.DrawString(((System.Drawing.KnownColor)i).ToString(),this.Font,Brushes.Black,20+StartPosition,(i%65-1)*10); e.Graphics.FillRectangle((new Pen(Color.FromKnownColor((System.Drawing.KnownColor)i),1)).Brush,0+StartPosition,(i%65-1)*10,19,20); StartPosition=(i/65)*170; } }