Method ToString
ToString()
Converts this Color structure to a human-readable string.
public override string? ToString()
Returns
- string
A string that is the name of this Color, if the Color is created from a predefined color by using either the FromName(string) method or the FromKnownColor(KnownColor) method; otherwise, a string that consists of the ARGB component names and their values.
Remarks
A predefined color is also called a known color and is represented by an element of the KnownColor enumeration. When the ToString() method is applied to a Color structure that is created by using the FromArgb(int) method, ToString() returns a string that consists of the ARGB component names and their values, even if the ARGB value matches the ARGB value of a predefined color.