From 0bf3b6d5f011001709ab69677bba7058ee01e86b 2012-04-06 21:34:55 From: MinRK Date: 2012-04-06 21:34:55 Subject: [PATCH] fix hex_to_rgb() used to guess light/dark in qtconsole previously used 'r' for all 3 values --- diff --git a/IPython/frontend/qt/console/styles.py b/IPython/frontend/qt/console/styles.py index e92eaf0..c8e2ba7 100644 --- a/IPython/frontend/qt/console/styles.py +++ b/IPython/frontend/qt/console/styles.py @@ -64,8 +64,8 @@ def hex_to_rgb(color): return False try: r = int(color[:2],16) - g = int(color[:2],16) - b = int(color[:2],16) + g = int(color[2:4],16) + b = int(color[4:],16) except ValueError: return False else: