Color.FromName

Color.FromName method

Creates a Color structure from the specified name of a predefined color.

public static Color FromName(string name)
ParameterTypeDescription
nameStringA string that is the name of a predefined color. Valid names are the same as the names of the elements of the KnownColor enumeration.

Return Value

The Color that this method creates.

See Also