Aspose::Cells::Color::FromName method

Color::FromName method

Creates a Color from a predefined color name.

static Color Aspose::Cells::Color::FromName(const U16String &name)
ParameterTypeDescription
nameconst U16String&A UTF-16 string containing the name of the color. The comparison is case-insensitive.

ReturnValue

A Color structure that corresponds to the specified name.

Remarks

Supports the standard set of 174 HTML color names (CSS named colors), such as red, green, blue, black, and white.

Examples

auto red   = Color::FromName(u"red");
auto blue  = Color::FromName(u"Blue");
auto white = Color::FromName(u"WHITE");

See Also