namespace font { const color_t NORMAL_COLOR {221, 221, 221}, GRAY_COLOR {119, 119, 119}, LOBBY_COLOR {187, 187, 187}, GOOD_COLOR {0 , 255, 0 }, BAD_COLOR {255, 0 , 0 }, BLACK_COLOR {0 , 0 , 0 }, YELLOW_COLOR {255, 255, 0 }, BUTTON_COLOR {186, 172, 125}, PETRIFIED_COLOR {160, 160, 160}, TITLE_COLOR {186, 172, 125}, LABEL_COLOR {107, 140, 255}, BIGMAP_COLOR {255, 255, 255}; const color_t DISABLED_COLOR = PETRIFIED_COLOR.inverse(); const color_t weapon_color {245, 230, 193}, good_dmg_color {130, 240, 50 }, bad_dmg_color {250, 140, 80 }, weapon_details_color {166, 146, 117}, inactive_details_color {146, 146, 146}, inactive_ability_color {146, 146, 146}, unit_type_color {245, 230, 193}, race_color {166, 146, 117}; }
inline std::string format_as_link(const std::string & link, color_t color) { return "<span underline=\'single\' color=\'" + color.to_hex_string() + "\'>" + link + "</span>"; }
size_t operator()(const color_t& c) const { return c.to_rgba_bytes(); }
void setAlpha(ubyte alpha){ color.setAlpha(alpha); }
void framebuffer_t::setPixelValue(int w, int h, color_t value) { pixelValueArray[h*stepSize + w*3 + 0] = value.getR(); pixelValueArray[h*stepSize + w*3 + 1] = value.getG(); pixelValueArray[h*stepSize + w*3 + 2] = value.getB(); }
color_t rendering_dc::text_color (color_t newcolor) { return ratwin::text::SetTextColor (Handle, newcolor.value()); }
color_t rendering_dc::bk_color (color_t newcolor) { return ratwin::gdi::SetBkColor (Handle, newcolor.value()); }
void canvas_t::set_background(color_t bg_color) { g_object_set(G_OBJECT(widget), "background-color-rgb", bg_color.rgb(), nullptr); }
bool color_t::operator== (const color_t & c){ return (this->r_comp == c.getR() && this->g_comp == c.getG() && this->b_comp == c.getB()); }