2012-02-17 23:12:01 +00:00
|
|
|
|
2015-03-19 05:05:30 +00:00
|
|
|
# Low-color themes should ONLY use the standard foreground and background
|
|
|
|
# colours listed here:
|
|
|
|
#
|
|
|
|
# http://urwid.org/manual/displayattributes.html
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Palette:
|
|
|
|
_fields = [
|
2015-03-19 07:49:43 +00:00
|
|
|
'title',
|
2015-03-19 05:05:30 +00:00
|
|
|
|
|
|
|
# Status bar & heading
|
|
|
|
'heading', 'heading_key', 'heading_inactive',
|
|
|
|
|
|
|
|
# Help
|
|
|
|
'key', 'head', 'text',
|
|
|
|
|
2015-04-03 01:10:57 +00:00
|
|
|
# Options
|
|
|
|
'option_selected', 'option_active', 'option_active_selected',
|
2015-04-03 01:38:04 +00:00
|
|
|
'option_selected_key',
|
2015-04-03 01:10:57 +00:00
|
|
|
|
2015-03-19 05:05:30 +00:00
|
|
|
# List and Connections
|
|
|
|
'method', 'focus',
|
|
|
|
'code_200', 'code_300', 'code_400', 'code_500', 'code_other',
|
|
|
|
'error',
|
2015-03-19 07:49:43 +00:00
|
|
|
'header', 'highlight', 'intercept', 'replay',
|
2015-03-19 05:05:30 +00:00
|
|
|
|
|
|
|
# Hex view
|
|
|
|
'offset',
|
|
|
|
|
|
|
|
# Grid Editor
|
|
|
|
'focusfield', 'focusfield_error', 'field_error', 'editfield',
|
|
|
|
]
|
|
|
|
high = None
|
|
|
|
|
|
|
|
def palette(self):
|
|
|
|
l = []
|
|
|
|
for i in self._fields:
|
|
|
|
v = [i]
|
|
|
|
v.extend(self.low[i])
|
|
|
|
if self.high and i in self.high:
|
|
|
|
v.append(None)
|
|
|
|
v.extend(self.high[i])
|
|
|
|
l.append(tuple(v))
|
|
|
|
return l
|
|
|
|
|
|
|
|
|
|
|
|
class LowDark(Palette):
|
|
|
|
"""
|
|
|
|
Low-color dark background
|
|
|
|
"""
|
|
|
|
low = dict(
|
|
|
|
title = ('white,bold', 'default'),
|
|
|
|
|
|
|
|
# Status bar & heading
|
|
|
|
heading = ('light gray', 'dark blue'),
|
|
|
|
heading_key = ('light cyan', 'dark blue'),
|
|
|
|
heading_inactive = ('white', 'dark gray'),
|
|
|
|
|
|
|
|
# Help
|
|
|
|
key = ('light cyan', 'default'),
|
|
|
|
head = ('white,bold', 'default'),
|
|
|
|
text = ('light gray', 'default'),
|
|
|
|
|
2015-04-03 01:10:57 +00:00
|
|
|
# Options
|
|
|
|
option_selected = ('light gray', 'dark blue'),
|
2015-04-03 06:44:09 +00:00
|
|
|
option_selected_key = ('light cyan', 'dark blue'),
|
|
|
|
option_active = ('light red', 'default'),
|
|
|
|
option_active_selected = ('light red', 'dark blue'),
|
2015-04-03 01:10:57 +00:00
|
|
|
|
2015-03-19 05:05:30 +00:00
|
|
|
# List and Connections
|
|
|
|
method = ('dark cyan', 'default'),
|
|
|
|
focus = ('yellow', 'default'),
|
|
|
|
|
|
|
|
code_200 = ('dark green', 'default'),
|
|
|
|
code_300 = ('light blue', 'default'),
|
|
|
|
code_400 = ('light red', 'default'),
|
|
|
|
code_500 = ('light red', 'default'),
|
|
|
|
code_other = ('dark red', 'default'),
|
|
|
|
|
|
|
|
error = ('light red', 'default'),
|
|
|
|
|
|
|
|
header = ('dark cyan', 'default'),
|
|
|
|
highlight = ('white,bold', 'default'),
|
|
|
|
intercept = ('brown', 'default'),
|
|
|
|
replay = ('light green', 'default'),
|
|
|
|
|
|
|
|
# Hex view
|
|
|
|
offset = ('dark cyan', 'default'),
|
|
|
|
|
|
|
|
# Grid Editor
|
|
|
|
focusfield = ('black', 'light gray'),
|
|
|
|
focusfield_error = ('dark red', 'light gray'),
|
|
|
|
field_error = ('dark red', 'default'),
|
|
|
|
editfield = ('white', 'default'),
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class Dark(LowDark):
|
|
|
|
high = dict(
|
|
|
|
heading_inactive = ('g58', 'g11'),
|
|
|
|
intercept = ('#f60', 'default'),
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class LowLight(Palette):
|
|
|
|
"""
|
|
|
|
Low-color light background
|
|
|
|
"""
|
|
|
|
low = dict(
|
2015-04-03 06:44:09 +00:00
|
|
|
title = ('dark magenta', 'default'),
|
2015-03-19 05:05:30 +00:00
|
|
|
|
|
|
|
# Status bar & heading
|
2015-04-03 06:44:09 +00:00
|
|
|
heading = ('white', 'black'),
|
|
|
|
heading_key = ('dark blue', 'black'),
|
2015-03-19 05:05:30 +00:00
|
|
|
heading_inactive = ('black', 'light gray'),
|
|
|
|
|
|
|
|
# Help
|
2015-04-03 06:44:09 +00:00
|
|
|
key = ('dark blue', 'default'),
|
|
|
|
head = ('black', 'default'),
|
2015-03-19 05:05:30 +00:00
|
|
|
text = ('dark gray', 'default'),
|
|
|
|
|
2015-04-03 01:10:57 +00:00
|
|
|
# Options
|
2015-04-03 06:44:09 +00:00
|
|
|
option_selected = ('black', 'light gray'),
|
|
|
|
option_selected_key = ('dark blue', 'light gray'),
|
2015-04-03 01:10:57 +00:00
|
|
|
option_active = ('light red', 'default'),
|
2015-04-03 06:44:09 +00:00
|
|
|
option_active_selected = ('light red', 'light gray'),
|
2015-04-03 01:10:57 +00:00
|
|
|
|
2015-03-19 05:05:30 +00:00
|
|
|
# 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 = ('dark blue', 'default'),
|
|
|
|
highlight = ('black,bold', 'default'),
|
|
|
|
intercept = ('brown', 'default'),
|
|
|
|
replay = ('dark green', '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', 'default'),
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class Light(LowLight):
|
2015-03-19 05:29:06 +00:00
|
|
|
high = dict(
|
|
|
|
heading = ('g99', '#08f'),
|
|
|
|
heading_key = ('#0ff,bold', '#08f'),
|
|
|
|
heading_inactive = ('g35', 'g85'),
|
|
|
|
replay = ('#0a0,bold', 'default'),
|
|
|
|
)
|
2015-03-19 05:05:30 +00:00
|
|
|
|
|
|
|
|
2015-03-19 07:49:43 +00:00
|
|
|
# Solarized palette in Urwid-style terminal high-colour offsets
|
|
|
|
# See: http://ethanschoonover.com/solarized
|
|
|
|
sol_base03 = "h234"
|
|
|
|
sol_base02 = "h235"
|
|
|
|
sol_base01 = "h240"
|
|
|
|
sol_base00 = "h241"
|
|
|
|
sol_base0 = "h244"
|
|
|
|
sol_base1 = "h245"
|
|
|
|
sol_base2 = "h254"
|
|
|
|
sol_base3 = "h230"
|
|
|
|
sol_yellow = "h136"
|
|
|
|
sol_orange = "h166"
|
|
|
|
sol_red = "h160"
|
|
|
|
sol_magenta = "h125"
|
|
|
|
sol_violet = "h61"
|
|
|
|
sol_blue = "h33"
|
|
|
|
sol_cyan = "h37"
|
|
|
|
sol_green = "h64"
|
2015-03-19 05:42:03 +00:00
|
|
|
class SolarizedLight(LowLight):
|
|
|
|
high = dict(
|
2015-04-06 04:46:51 +00:00
|
|
|
title = (sol_cyan, 'default'),
|
2015-03-19 07:49:43 +00:00
|
|
|
text = (sol_base00, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
|
|
|
# Status bar & heading
|
2015-03-19 07:49:43 +00:00
|
|
|
heading = (sol_base2, sol_base02),
|
|
|
|
heading_key = (sol_blue, sol_base03),
|
|
|
|
heading_inactive = (sol_base03, sol_base1),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
|
|
|
# Help
|
2015-03-19 07:49:43 +00:00
|
|
|
key = (sol_blue, 'default',),
|
|
|
|
head = (sol_base00, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
2015-04-03 01:10:57 +00:00
|
|
|
# Options
|
2015-04-03 06:44:09 +00:00
|
|
|
option_selected = (sol_base03, sol_base2),
|
|
|
|
option_selected_key = (sol_blue, sol_base2),
|
2015-04-03 01:10:57 +00:00
|
|
|
option_active = (sol_orange, 'default'),
|
2015-04-03 06:44:09 +00:00
|
|
|
option_active_selected = (sol_orange, sol_base2),
|
2015-04-03 01:10:57 +00:00
|
|
|
|
2015-03-19 05:42:03 +00:00
|
|
|
# List and Connections
|
2015-03-19 07:49:43 +00:00
|
|
|
method = (sol_cyan, 'default'),
|
|
|
|
focus = (sol_base01, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
2015-03-19 07:49:43 +00:00
|
|
|
code_200 = (sol_green, 'default'),
|
|
|
|
code_300 = (sol_blue, 'default'),
|
|
|
|
code_400 = (sol_orange, 'default',),
|
|
|
|
code_500 = (sol_red, 'default'),
|
|
|
|
code_other = (sol_magenta, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
2015-03-19 07:49:43 +00:00
|
|
|
error = (sol_red, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
2015-03-19 07:49:43 +00:00
|
|
|
header = (sol_base01, 'default'),
|
|
|
|
highlight = (sol_base01, 'default'),
|
|
|
|
intercept = (sol_red, 'default',),
|
|
|
|
replay = (sol_green, 'default',),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
|
|
|
# Hex view
|
2015-03-19 07:49:43 +00:00
|
|
|
offset = (sol_cyan, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
|
|
|
# Grid Editor
|
2015-03-19 07:49:43 +00:00
|
|
|
focusfield = (sol_base00, sol_base2),
|
|
|
|
focusfield_error = (sol_red, sol_base2),
|
|
|
|
field_error = (sol_red, 'default'),
|
|
|
|
editfield = (sol_base01, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
)
|
|
|
|
|
2015-03-19 07:49:43 +00:00
|
|
|
|
2015-03-19 05:42:03 +00:00
|
|
|
class SolarizedDark(LowDark):
|
|
|
|
high = dict(
|
2015-03-19 07:49:43 +00:00
|
|
|
title = (sol_blue, 'default'),
|
2015-04-03 06:44:09 +00:00
|
|
|
text = (sol_base1, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
|
|
|
# Status bar & heading
|
2015-04-03 06:44:09 +00:00
|
|
|
heading = (sol_base2, sol_base01),
|
|
|
|
heading_key = (sol_blue+",bold", sol_base01),
|
2015-03-19 07:49:43 +00:00
|
|
|
heading_inactive = (sol_base1, sol_base02),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
|
|
|
# Help
|
2015-03-19 07:49:43 +00:00
|
|
|
key = (sol_blue, 'default',),
|
2015-04-03 06:44:09 +00:00
|
|
|
head = (sol_base2, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
2015-04-03 01:10:57 +00:00
|
|
|
# Options
|
2015-04-03 06:44:09 +00:00
|
|
|
option_selected = (sol_base03, sol_base00),
|
|
|
|
option_selected_key = (sol_blue, sol_base00),
|
|
|
|
option_active = (sol_orange, 'default'),
|
|
|
|
option_active_selected = (sol_orange, sol_base00),
|
2015-04-03 01:10:57 +00:00
|
|
|
|
2015-03-19 05:42:03 +00:00
|
|
|
# List and Connections
|
2015-03-19 07:49:43 +00:00
|
|
|
method = (sol_cyan, 'default'),
|
|
|
|
focus = (sol_base1, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
2015-03-19 07:49:43 +00:00
|
|
|
code_200 = (sol_green, 'default'),
|
|
|
|
code_300 = (sol_blue, 'default'),
|
|
|
|
code_400 = (sol_orange, 'default',),
|
|
|
|
code_500 = (sol_red, 'default'),
|
|
|
|
code_other = (sol_magenta, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
2015-03-19 07:49:43 +00:00
|
|
|
error = (sol_red, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
2015-03-19 07:49:43 +00:00
|
|
|
header = (sol_base01, 'default'),
|
|
|
|
highlight = (sol_base01, 'default'),
|
|
|
|
intercept = (sol_red, 'default',),
|
|
|
|
replay = (sol_green, 'default',),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
|
|
|
# Hex view
|
2015-03-19 07:49:43 +00:00
|
|
|
offset = (sol_cyan, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
|
|
|
|
# Grid Editor
|
2015-03-19 07:49:43 +00:00
|
|
|
focusfield = (sol_base0, sol_base02),
|
|
|
|
focusfield_error = (sol_red, sol_base02),
|
|
|
|
field_error = (sol_red, 'default'),
|
|
|
|
editfield = (sol_base1, 'default'),
|
2015-03-19 05:42:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-03-19 05:05:30 +00:00
|
|
|
palettes = {
|
2015-04-03 01:38:04 +00:00
|
|
|
"lowlight": LowLight(),
|
2015-04-03 06:44:09 +00:00
|
|
|
"lowdark": LowDark(),
|
|
|
|
"light": Light(),
|
|
|
|
"dark": Dark(),
|
2015-03-19 05:42:03 +00:00
|
|
|
"solarized_light": SolarizedLight(),
|
2015-04-03 06:44:09 +00:00
|
|
|
"solarized_dark": SolarizedDark(),
|
2012-06-30 05:37:38 +00:00
|
|
|
}
|