Method FromName
FromName(string)
Creates a Color structure from the specified name of a predefined color.
public static Color FromName(string name)
Parameters
name
stringA string that is the name of a predefined color. Valid names are the same as the names of the elements of the KnownColor enumeration.
Returns
Remarks
A predefined color is also called a known color and is represented by an element of the KnownColor enumeration. If the name parameter is not the valid name of a predefined color, the FromName(string) method creates a Color structure that has an ARGB value of 0 (that is, all ARGB components are 0).