X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6dfb13b1b7122da1700ca915ecf9d1047492c470..3bcdbe527fde583072eefab67de8974c0e17a1e2:/wxPython/wx/lib/colourselect.py?ds=sidebyside diff --git a/wxPython/wx/lib/colourselect.py b/wxPython/wx/lib/colourselect.py index 6fb0bd7e77..8b196d6461 100644 --- a/wxPython/wx/lib/colourselect.py +++ b/wxPython/wx/lib/colourselect.py @@ -86,8 +86,10 @@ class ColourSelect(wx.BitmapButton): self.SetColour(colour) def SetColour(self, colour): - if type(colour) == type( () ): - colour = wxColour(*colour) + if type(colour) == tuple: + colour = wx.Colour(*colour) + if type(colour) == str: + colour = wx.NamedColour(colour) self.colour = colour bmp = self.MakeBitmap()