summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xurwid/display_common.py6
-rw-r--r--urwid/raw_display.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/urwid/display_common.py b/urwid/display_common.py
index 9717b61..131c0aa 100755
--- a/urwid/display_common.py
+++ b/urwid/display_common.py
@@ -920,6 +920,8 @@ class BaseScreen(with_metaclass(signals.MetaSignals, object)):
foreground_high = foreground
if background_high is None:
background_high = background
+
+ high_256 = AttrSpec(foreground_high, background_high, 256)
high_true = AttrSpec(foreground_high, background_high, 2**24)
# 'hX' where X > 15 are different in 88/256 color, use
@@ -938,8 +940,8 @@ class BaseScreen(with_metaclass(signals.MetaSignals, object)):
high_88 = AttrSpec(foreground_high, background_high, 88)
signals.emit_signal(self, UPDATE_PALETTE_ENTRY,
- name, basic, mono, high_88, high_true)
- self._palette[name] = (basic, mono, high_88, high_true)
+ name, basic, mono, high_88, high_256, high_true)
+ self._palette[name] = (basic, mono, high_88, high_256, high_true)
def _test():
diff --git a/urwid/raw_display.py b/urwid/raw_display.py
index f07c50d..4c90a68 100644
--- a/urwid/raw_display.py
+++ b/urwid/raw_display.py
@@ -101,7 +101,7 @@ class Screen(BaseScreen, RealTerminal):
def _on_update_palette_entry(self, name, *attrspecs):
# copy the attribute to a dictionary containing the escape seqences
- a = attrspecs[{16:0,1:1,88:2,256:3,2**24:3}[self.colors]]
+ a = attrspecs[{16:0,1:1,88:2,256:3,2**24:4}[self.colors]]
self._pal_attrspec[name] = a
self._pal_escape[name] = self._attrspec_to_escape(a)