From 3346f0af4f6392da385d2b63e13568f9a792105c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Apr 2014 17:28:29 +0530 Subject: [PATCH] Dont serialize alpha color component as the QColor constructor cannot handle them --- src/calibre/gui2/widgets2.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/calibre/gui2/widgets2.py b/src/calibre/gui2/widgets2.py index c21a6d7ae1..ad4aaee495 100644 --- a/src/calibre/gui2/widgets2.py +++ b/src/calibre/gui2/widgets2.py @@ -84,9 +84,5 @@ class ColorButton(QPushButton): def choose_color(self): col = QColorDialog.getColor(QColor(self._color or Qt.white), self, _('Choose a color')) if col.isValid(): - r, g, b, a = col.getRgb() - if a != 255: - self.color = '#%02x%02x%02x%02x' % col.getRgb() - else: - self.color = '#%02x%02x%02x' % (r, g, b) + self.color = unicode(col.name())