|
NovaSVG 0.10.0
A header-only SVG library
|
String literal operators for creating Color instances. More...
Functions | |
| novasvg::Color | operator""_c (const char *str, std::size_t len) |
| String literal operator for creating Color instances. | |
String literal operators for creating Color instances.
This namespace provides the _c suffix operator for creating colors from string literals at compile-time (when possible).
|
inline |
String literal operator for creating Color instances.
This operator allows creating colors using the _c suffix on string literals. It automatically detects whether the string is a hex color code or a color name.
| str | String literal (must include quotes). |
| len | Length of the string literal. |
| std::invalid_argument | If the format is invalid or the color name is not recognized. |
Definition at line 1018 of file color.h.
References novasvg::Color::fromString().