From 3060ad557504f17ffa116b7733151e43ecf7cd71 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Fri, 29 Jun 2012 09:25:29 +0200 Subject: [PATCH 1/4] Replace double quotes with single quotes --- libmproxy/console/palettes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libmproxy/console/palettes.py b/libmproxy/console/palettes.py index c1d831882..effd15c4a 100644 --- a/libmproxy/console/palettes.py +++ b/libmproxy/console/palettes.py @@ -21,9 +21,9 @@ dark = [ ('editline', 'white', 'default',), # Status bar & heading - ('heading', 'light gray', "dark blue", None, "g85", "dark blue"), - ('heading_key', 'light cyan', "dark blue", None, "light cyan", "dark blue"), - ('heading_inactive', 'white', 'dark gray', None, "g58", "g11"), + ('heading', 'light gray', 'dark blue', None, 'g85', 'dark blue'), + ('heading_key', 'light cyan', 'dark blue', None, 'light cyan', 'dark blue'), + ('heading_inactive', 'white', 'dark gray', None, 'g58', 'g11'), # Help ('key', 'light cyan', 'default'), @@ -36,7 +36,7 @@ dark = [ ('code_200', 'light green', 'default'), ('code_300', 'light blue', 'default'), - ('code_400', 'light red', 'default', None, "#f60", "default"), + ('code_400', 'light red', 'default', None, '#f60', 'default'), ('code_500', 'light red', 'default'), ('code_other', 'dark red', 'default'), @@ -44,8 +44,8 @@ dark = [ ('header', 'dark cyan', 'default'), ('highlight', 'white,bold', 'default'), - ('intercept', 'brown', 'default', None, "#f60", "default"), - ('replay', 'light green', 'default', None, "#0f0", "default"), + ('intercept', 'brown', 'default', None, '#f60', 'default'), + ('replay', 'light green', 'default', None, '#0f0', 'default'), ('ack', 'light red', 'default'), # Hex view From e287eac462040275d7f02d113b4d261c4d2ccaac Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Fri, 29 Jun 2012 11:16:05 +0200 Subject: [PATCH 2/4] Add light palette for light backgrounds --- libmproxy/console/palettes.py | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/libmproxy/console/palettes.py b/libmproxy/console/palettes.py index effd15c4a..7e36809be 100644 --- a/libmproxy/console/palettes.py +++ b/libmproxy/console/palettes.py @@ -14,7 +14,12 @@ # along with this program. If not, see . +# Default palette for dark background dark = [ + # name, foreground, background, mono, foreground_high, background_high + # For details on the meaning of the elements refer to + # http://excess.org/urwid/reference.html#Screen-register_palette + ('body', 'black', 'dark cyan'), ('foot', 'light gray', 'default'), ('title', 'white,bold', 'default',), @@ -57,3 +62,48 @@ dark = [ ('field_error', 'dark red', 'black'), ('editfield', 'black', 'light cyan'), ] + +# Palette for light background +light = [ + ('body', 'black', 'dark cyan'), + ('foot', 'dark gray', 'default'), + ('title', 'white,bold', 'default',), + ('editline', 'white', 'default',), + + # Status bar & heading + ('heading', 'white', 'light gray', None, 'g85', 'dark blue'), + ('heading_key', 'dark blue', 'light gray', None, 'light cyan', 'dark blue'), + ('heading_inactive', 'light gray', 'dark gray', None, 'g58', 'g11'), + + # Help + ('key', 'dark blue,bold', 'default'), + ('head', 'black,bold', 'default'), + ('text', 'dark gray', 'default'), + + # List and Connections + ('method', 'dark cyan', 'default'), + ('focus', 'black', 'default'), + + ('code_200', 'dark green', 'default'), + ('code_300', 'light blue', 'default'), + ('code_400', 'dark red', 'default', None, '#f60', 'default'), + ('code_500', 'dark red', 'default'), + ('code_other', 'light red', 'default'), + + ('error', 'light red', 'default'), + + ('header', 'dark blue', 'default'), + ('highlight', 'black,bold', 'default'), + ('intercept', 'brown', 'default', None, '#f60', 'default'), + ('replay', 'dark green', 'default', None, '#0f0', 'default'), + ('ack', 'dark red', 'default'), + + # Hex view + ('offset', 'dark blue', 'default'), + + # Grid Editor + ('focusfield', 'black', 'light gray'), + ('focusfield_error', 'dark red', 'light gray'), + ('field_error', 'dark red', 'black'), + ('editfield', 'black', 'light cyan'), +] From 3b80e8dd02a91e70ddffaa96452da53ee4e93368 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Fri, 29 Jun 2012 12:24:59 +0200 Subject: [PATCH 3/4] Add palettes for Solarized terminal color profiles --- libmproxy/console/palettes.py | 95 +++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/libmproxy/console/palettes.py b/libmproxy/console/palettes.py index 7e36809be..d7c78c746 100644 --- a/libmproxy/console/palettes.py +++ b/libmproxy/console/palettes.py @@ -107,3 +107,98 @@ light = [ ('field_error', 'dark red', 'black'), ('editfield', 'black', 'light cyan'), ] + +# Palettes for terminals that use the Solarized precision colors +# (http://ethanschoonover.com/solarized#the-values) + +# For dark backgrounds +solarized_dark = [ + ('body', 'dark cyan', 'default'), + ('foot', 'dark gray', 'default'), + ('title', 'white,bold', 'default',), + ('editline', 'white', 'default',), + + # Status bar & heading + ('heading', 'light gray', 'light cyan',), + ('heading_key', 'dark blue', 'white',), + ('heading_inactive', 'light cyan', 'default',), + + # Help + ('key', 'dark blue', 'default',), + ('head', 'white,underline', 'default'), + ('text', 'light cyan', 'default'), + + # List and Connections + ('method', 'dark cyan', 'default'), + ('focus', 'white', 'default'), + + ('code_200', 'dark green', 'default'), + ('code_300', 'light blue', 'default'), + ('code_400', 'dark red', 'default',), + ('code_500', 'dark red', 'default'), + ('code_other', 'light red', 'default'), + + ('error', 'light red', 'default'), + + ('header', 'yellow', 'default'), + ('highlight', 'white', 'default'), + ('intercept', 'brown', 'default',), + ('replay', 'dark green', 'default',), + ('ack', 'dark red', 'default'), + + # Hex view + ('offset', 'yellow', 'default'), + ('text', 'light cyan', 'default'), + + # Grid Editor + ('focusfield', 'white', 'light cyan'), + ('focusfield_error', 'dark red', 'light gray'), + ('field_error', 'dark red', 'black'), + ('editfield', 'black', 'light gray'), +] + +# For light backgrounds +solarized_light = [ + ('body', 'dark cyan', 'default'), + ('foot', 'dark gray', 'default'), + ('title', 'white,bold', 'default',), + ('editline', 'white', 'default',), + + # Status bar & heading + ('heading', 'white,standout', 'light cyan',), + ('heading_key', 'dark blue', 'white',), + ('heading_inactive', 'light gray', 'default',), + + # Help + ('key', 'dark blue', 'default',), + ('head', 'black,underline', 'default'), + ('text', 'light cyan', 'default'), + + # List and Connections + ('method', 'dark cyan', 'default'), + ('focus', 'black', 'default'), + + ('code_200', 'dark green', 'default'), + ('code_300', 'light blue', 'default'), + ('code_400', 'dark red', 'default',), + ('code_500', 'dark red', 'default'), + ('code_other', 'light red', 'default'), + + ('error', 'light red', 'default'), + + ('header', 'light cyan', 'default'), + ('highlight', 'black,bold', 'default'), + ('intercept', 'brown', 'default',), + ('replay', 'dark green', 'default',), + ('ack', 'dark red', 'default'), + + # Hex view + ('offset', 'light cyan', 'default'), + ('text', 'yellow', 'default'), + + # Grid Editor + ('focusfield', 'black', 'light gray'), + ('focusfield_error', 'dark red', 'light gray'), + ('field_error', 'dark red', 'black'), + ('editfield', 'white', 'light cyan'), +] From 0a0a6aae0bd4c8376d1c5fab3ef39a1f85cce2b5 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Fri, 29 Jun 2012 16:58:28 +0200 Subject: [PATCH 4/4] Update title palette colors for light backgrounds --- libmproxy/console/palettes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmproxy/console/palettes.py b/libmproxy/console/palettes.py index d7c78c746..39d49dd4a 100644 --- a/libmproxy/console/palettes.py +++ b/libmproxy/console/palettes.py @@ -67,7 +67,7 @@ dark = [ light = [ ('body', 'black', 'dark cyan'), ('foot', 'dark gray', 'default'), - ('title', 'white,bold', 'default',), + ('title', 'white,bold', 'light blue',), ('editline', 'white', 'default',), # Status bar & heading @@ -161,7 +161,7 @@ solarized_dark = [ solarized_light = [ ('body', 'dark cyan', 'default'), ('foot', 'dark gray', 'default'), - ('title', 'white,bold', 'default',), + ('title', 'white,bold', 'light cyan',), ('editline', 'white', 'default',), # Status bar & heading