Click or drag to resize

ColorTryParse Method

Converts the specified string to a color

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
public static bool TryParse(
	string value,
	out Color color


Type: SystemString
String value to parse
Type: Eto.DrawingColor
Color struct with the parsed value, or Transparent if value is invalid

Return Value

Type: Boolean
True if the value was successfully parsed into a color, false otherwise
The string can be any of these formats: - #AARRGGBB or #RRGGBB (where ARGB are hex values) - 0xAARRGGBB or 0xRRGGBB - [named] (where [named] is a name of one of the properties in Colors) - [uint] (where [uint] is a base-10 ARGB value) - [red], [green], [blue] (where each component is a value from 0-255) - [alpha], [red], [green], [blue] (where each component is a value from 0-255) If the string is null or empty, this will return Transparent
See Also