Method TryParse
- Namespace
- DocWright.Core.Primitives
- Assembly
- DocWright.Core.dll
TryParse(string?, out ColorRgb)
Attempts to parse an ST_HexColor value. See Parse(string).
public static bool TryParse(string? text, out ColorRgb color)
Parameters
textstringThe text to parse; may be null.
colorColorRgbThe parsed color on success; Black on failure.
Returns
TryParse(ReadOnlySpan<char>, out ColorRgb)
Attempts to parse an ST_HexColor value from a character span. Allocation-free.
public static bool TryParse(ReadOnlySpan<char> text, out ColorRgb color)
Parameters
textReadOnlySpan<char>The text to parse.
colorColorRgbThe parsed color on success; Black on failure.