From 5acf882607cf1c5be5b8c1824f2ffb366a6e35db Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Tue, 1 Oct 2024 00:33:05 +0100 Subject: [PATCH] Update core.py --- iblqt/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iblqt/core.py b/iblqt/core.py index 82c28e7..71226e5 100644 --- a/iblqt/core.py +++ b/iblqt/core.py @@ -360,10 +360,10 @@ def data( row = self._dataFrame.index[index.row()] col = index.column() if role == Qt.BackgroundRole: - rgb = self._background[row][col] - return QVariant(QColor.fromRgb(*rgb, self._alpha)) + r, g, b = self._background[row][col] + return QVariant(QColor.fromRgb(r, g, b, self._alpha)) if role == Qt.ForegroundRole: - lum: int = self._foreground[row][col] + lum = self._foreground[row][col] color = QColor('black' if (lum * self._alpha) < 32512 else 'white') return QVariant(color) return super().data(index, role)