|
commons 0.1.5
Header-only C++23 library of common/shared types for the C++ libraries
|
The CSS named colors as static constexpr Color values (the single source of truth for their hex), plus a case-insensitive name lookup via parse.
More...
#include <color.hpp>

Static Public Member Functions | |
| static constexpr std::optional< Color > | parse (const std::string_view name) |
Resolve a CSS color name (case-insensitive) to its Color, or nullopt if the name is unknown. | |
The CSS named colors as static constexpr Color values (the single source of truth for their hex), plus a case-insensitive name lookup via parse.
|
inlinestaticconstexpr |
Resolve a CSS color name (case-insensitive) to its Color, or nullopt if the name is unknown.
The lookup table references the members above, so color values live in exactly one place.