Class ColorConvert
Conversion methods for a System.Drawing.Color to and from a string.
Inheritance
System.Object
ColorConvert
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Drawing
Assembly: Syncfusion.Shared.Base.dll
Syntax
public sealed class ColorConvert
Constructors
ColorConvert()
Declaration
public ColorConvert()
Methods
ColorFromString(String)
ColorFromString parses a string previously generated with ColorToString and returns a color.
Declaration
public static Color ColorFromString(string parseStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | parseStr | String generated with ColorToString. |
Returns
Type | Description |
---|---|
System.Drawing.Color | Color value that was encoded in parseStr. |
ColorToString(Color, Boolean)
ColorToString creates a string from a color. All information such as knownColor and name in the color structure will be preserved.
Declaration
public static string ColorToString(Color color, bool writeName)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Color | color | |
System.Boolean | writeName |
Returns
Type | Description |
---|---|
System.String | A string that can be passed as parameter to ColorFromString. |