|
Color3TryParse Method |
TryParse method tries to parse the color text and set the color out parameter.
When the color text starts with hash character (#), then the color is specified as a hex value in format RRGGBB or RGB, for example #FF0000 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.
When the color be parse, the color is set to the color out parameter and the method returns true. Otherwise color is set to Black color and the methods returns false.
Namespace: Ab4d.SharpEngine.CommonAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public static bool TryParse(
string? colorText,
out Color3? color
)
Parameters
- colorText String
- color text as hex color (#RRGGBB or #RGB) or color name (Red)
- color Color3
- parsed color
Return Value
Booleantrue when the method can parse the color, otherwise false
See Also