8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 319f35b commit e996655Copy full SHA for e996655
lib/matplotlib/backends/backend_wx.py
@@ -418,23 +418,7 @@ def set_joinstyle(self, js):
418
def get_wxcolour(self, color):
419
"""Convert a RGB(A) color to a wx.Colour."""
420
_log.debug("%s - get_wx_color()", type(self))
421
- if len(color) == 3:
422
- r, g, b = color
423
- r *= 255
424
- g *= 255
425
- b *= 255
426
- return wx.Colour(red=int(r), green=int(g), blue=int(b))
427
- else:
428
- r, g, b, a = color
429
430
431
432
- a *= 255
433
- return wx.Colour(
434
- red=int(r),
435
- green=int(g),
436
- blue=int(b),
437
- alpha=int(a))
+ return wx.Colour(*[int(255 * x) for x in color])
438
439
440
class _FigureCanvasWxBase(FigureCanvasBase, wx.Panel):
0 commit comments