Aspose::Cells::Color::ToHex method

Color::ToHex method

Converts the current Color to its hexadecimal string representation.

U16String Aspose::Cells::Color::ToHex(bool withAlpha=false) const
ParameterTypeDescription
withAlphabooltrue to include the alpha component in the output; otherwise, false.

ReturnValue

A UTF-16 string that represents the color in hexadecimal format: #rrggbb or #aarrggbb.

Remarks

The returned string is always lowercase and prefixed with ‘#’.

See Also