|
qxLib
|
Helper class for string -> color conversion. More...
Public Member Functions | |
| void | add (basic_string< char_t > sName, color_name_type eColorNameType, color color) noexcept |
| Add new color to the mapping. More... | |
| std::optional< color > | get (const basic_string< char_t > &sName) const noexcept |
| Try to get ac olor from a color name. More... | |
| std::optional< basic_string_view< char_t > > | get (const color &color, color_name_type eColorNameType) const noexcept |
| Try to a color name get from a color. More... | |
Helper class for string -> color conversion.
The only purpose of this class is to hide the map from a user
| char_t | - string char type |
|
inlinenoexcept |
Add new color to the mapping.
| sName | - name registered for forward lookup |
| eColorNameType | - css_snake or css_pascal selects the reverse lookup table; other formats only update the forward lookup |
| color | - RGBA value associated with sName; an existing entry with the same key is replaced |
|
inlinenoexcept |
|
inlinenoexcept |