def IconFromSymbolic(image:wx.Image, color:wx.Colour): new_image = image.Copy() c_r = color.Red() c_g = color.Green() c_b = color.Blue() for x in range(0, new_image.Width): for y in range(0, new_image.Height): r = new_image.GetRed(x,y) g = new_image.GetRed(x,y) b = new_image.GetRed(x,y) if r == 128 and g == 128 and b == 128: new_image.SetRGB(x, y, c_r, c_g, c_b) return new_image
def change_opacity(color: wx.Colour, new_op: int): return wx.Colour(color.Red(), color.Green(), color.Blue(), new_op)
def opacity_mul(color: wx.Colour, fraction: float) -> wx.Colour: return wx.Colour(color.Red(), color.Green(), color.Blue(), color.Alpha() * fraction)
def set_reaction_fill_rgb(self, neti: int, reai: int, color: wx.Colour): iod.setReactionFillColorRGB(neti, reai, color.Red(), color.Green(), color.Blue())
def set_node_border_rgb(self, neti: int, nodei: int, color: wx.Colour): iod.setNodeBorderColorRGB(neti, nodei, color.Red(), color.Green(), color.Blue())
def set_node_fill_rgb(self, neti: int, nodei: int, color: wx.Colour): iod.setNodeFillColorRGB(neti, nodei, color.Red(), color.Green(), color.Blue())
def wx_to_tcolor(self, color: wx.Colour) -> Color: return Color(color.Red(), color.Green(), color.Blue(), color.Alpha())
def _to_color(color: wx.Colour) -> Color: return Color(color.Red(), color.Green(), color.Blue(), color.Alpha())