22 #include <pango/pango-color.h>
45 std::string cstr = color_str;
49 && std::all_of(cstr.begin(), cstr.end(), [](
int i) { return isxdigit(i); }))
55 if(pango_color_parse(&color, cstr.c_str())) {
Define the common log macros for the gui toolkit.
const color_t LABEL_COLOR
const color_t YELLOW_COLOR
const color_t unit_type_color
const color_t TITLE_COLOR
const color_t weapon_details_color
const color_t good_dmg_color
const color_t NORMAL_COLOR
color_t string_to_color(const std::string &color_str)
Return the color the string represents.
const color_t weapon_color
const color_t INACTIVE_COLOR
const color_t bad_dmg_color
The basic class for representing 8-bit RGB or RGBA colour values.
static constexpr color_t from_pango_format(uint16_t r, uint16_t g, uint16_t b)
Creates a new color_t object from a triplet of 16 bit color values, usually used by Pango.