Color.Name Property
.NET Framework (current version)
Gets the name of this Color.
Assembly: System.Drawing (in System.Drawing.dll)
This method returns either the user-defined name of the color, if the color was created from a name, or the name of the known color. For custom colors, the RGB value is returned.
The following code example demonstrates how to use the Name property. This example is designed to be used with Windows Forms. Paste the code into a form that contains a button named Button2 and associate the Button2_Click method with the button's Click event.
.NET Framework
Available since 1.1
Available since 1.1
Show: