Function tryParseSRgba8Hex

Tries to parse exact eight-digit hexadecimal encoded-sRGB straight-alpha storage.

bool tryParseSRgba8Hex(
  scope const(char)[] text,
  ref SRgba8 output
) pure nothrow @nogc @safe;

The accepted form is exactly #RRGGBBAA, with alpha in the final byte pair. Hexadecimal letters are case-insensitive. Shorthand forms, whitespace, missing #, extra characters, and non-hexadecimal digits are rejected.

Parameters

NameDescription
text Candidate nine-character hexadecimal form.
output Destination storage value. It is unchanged on failure.

Returns

true when text was parsed; otherwise false.