Click or drag to resize
Ab4d.SharpEngine logo

Color4Parse Method

Parse method returns the color that was parsed from the color text. If the text cannot be parsed a FormatException is thrown (use TryParse(String, Color4) if you do not want to get an exception). When the color text starts with hash character (#), then the color is specified as a hex value in format RRGGBBAA, RGBA, RRGGBB or RGB (for example #FF0000FF for red color). Otherwise the color text should be one of the color names from the known colors defined in the Colors class. The name can be in any case.

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntax
C#
public static Color4 Parse(
	string colorText
)

Parameters

colorText  String
color text as hex color (#RRGGBAA, #RGBA, #RRGGBB, #RGB) or color name (Red)

Return Value

Color4
color that was parsed from the color text
See Also