Function tryParseSRgb8Hex

Tries to parse exact six-digit hexadecimal encoded-sRGB storage.

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

The accepted form is exactly #RRGGBB. Hexadecimal letters are case-insensitive. Shorthand forms, whitespace, missing #, extra characters, and non-hexadecimal digits are rejected.

Parameters

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

Returns

true when text was parsed; otherwise false.