Tony
Tony

Reputation: 479

Is there a way to see the color that will display for a .NET color name?

I'm using System.Drawing.Color, is there anything in Visual Studio that can display the color for the name?

For example if I used Color.Cornsilk what would color would be displayed?

Upvotes: 2

Views: 1225

Answers (4)

Michaël Carpentier
Michaël Carpentier

Reputation: 2135

You could test the color on any control through VS designer.
Set a Panel BackgroundColor for example.

Anyway named color samples can be found anywhere on the web.
Here is a good reference for working with colors (select Named Web Color in the drop down).

Upvotes: 2

Ash
Ash

Reputation: 62096

The Windows Forms properties window allows you to select Color related properties using a "Color Picker" that displays the actual color next to the name.

Just type in the color name within the property value area, press enter, and if the name is a known .NET color, it is shown.

Upvotes: 2

bendewey
bendewey

Reputation: 40235

Take a look at Jon Skeets Answer from this post

C# Color constant R,G,B values

Upvotes: -1

Related Questions