#NEWLINE# def get_palette( may_use_fancy_formats , theme = 'classic' ) : #NEWLINE# #INDENT# if may_use_fancy_formats : #NEWLINE# #INDENT# def add_setting( color , setting ) : #NEWLINE# #INDENT# return ( ( color + ',' ) + setting ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# def add_setting( color , setting ) : #NEWLINE# #INDENT# return color #NEWLINE# #UNINDENT# #UNINDENT# palette_dict = { #NEWLINE# #INDENT# 'header' : ( 'black' , 'light gray' , 'standout' ) , #NEWLINE# 'selectable' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'focused selectable' : ( 'black' , 'dark green' ) , #NEWLINE# 'button' : ( add_setting ( 'white' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'focused button' : ( 'light cyan' , 'black' ) , #NEWLINE# 'dialog title' : ( add_setting ( 'white' , 'bold' ) , 'dark cyan' ) , #NEWLINE# 'background' : ( 'black' , 'light gray' ) , #NEWLINE# 'hotkey' : ( add_setting ( 'black' , 'underline' ) , 'light gray' , 'underline' ) , #NEWLINE# 'focused sidebar' : ( add_setting ( 'yellow' , 'bold' ) , 'light gray' , 'standout' ) , #NEWLINE# 'warning' : ( add_setting ( 'white' , 'bold' ) , 'dark red' , 'standout' ) , #NEWLINE# 'label' : ( 'black' , 'light gray' ) , #NEWLINE# 'value' : ( add_setting ( 'yellow' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'fixed value' : ( 'light gray' , 'dark blue' ) , #NEWLINE# 'group head' : ( add_setting ( 'dark blue' , 'bold' ) , 'light gray' ) , #NEWLINE# 'search box' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'search not found' : ( 'white' , 'dark red' ) , #NEWLINE# 'command line edit' : ( add_setting ( 'yellow' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'command line prompt' : ( add_setting ( 'white' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'command line output' : ( 'light cyan' , 'dark blue' ) , #NEWLINE# 'command line input' : ( add_setting ( 'light cyan' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'command line error' : ( add_setting ( 'light red' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'focused command line output' : ( 'black' , 'dark green' ) , #NEWLINE# 'focused command line input' : ( add_setting ( 'light cyan' , 'bold' ) , 'dark green' ) , #NEWLINE# 'focused command line error' : ( 'black' , 'dark green' ) , #NEWLINE# 'command line clear button' : ( add_setting ( 'white' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'command line focused button' : ( 'light cyan' , 'black' ) , #NEWLINE# 'breakpoint' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'focused breakpoint' : ( 'black' , 'dark green' ) , #NEWLINE# 'current breakpoint' : ( add_setting ( 'white' , 'bold' ) , 'dark cyan' ) , #NEWLINE# 'focused current breakpoint' : ( add_setting ( 'white' , 'bold' ) , 'dark green' , 'bold' ) , #NEWLINE# 'source' : ( add_setting ( 'yellow' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'focused source' : ( 'black' , 'dark green' ) , #NEWLINE# 'highlighted source' : ( 'black' , 'dark magenta' ) , #NEWLINE# 'current source' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'current focused source' : ( add_setting ( 'white' , 'bold' ) , 'dark cyan' ) , #NEWLINE# 'current highlighted source' : ( 'white' , 'dark cyan' ) , #NEWLINE# 'line number' : ( 'light gray' , 'dark blue' ) , #NEWLINE# 'keyword' : ( add_setting ( 'white' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'name' : ( 'light cyan' , 'dark blue' ) , #NEWLINE# 'literal' : ( 'light magenta, bold' , 'dark blue' ) , #NEWLINE# 'string' : ( add_setting ( 'light magenta' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'doublestring' : ( add_setting ( 'light magenta' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'singlestring' : ( add_setting ( 'light magenta' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'docstring' : ( add_setting ( 'light magenta' , 'bold' ) , 'dark blue' ) , #NEWLINE# 'punctuation' : ( 'light gray' , 'dark blue' ) , #NEWLINE# 'comment' : ( 'light gray' , 'dark blue' ) , #NEWLINE# 'breakpoint marker' : ( 'dark red' , 'dark blue' ) , #NEWLINE# 'breakpoint source' : ( add_setting ( 'yellow' , 'bold' ) , 'dark red' ) , #NEWLINE# 'breakpoint focused source' : ( 'black' , 'dark red' ) , #NEWLINE# 'current breakpoint source' : ( 'black' , 'dark red' ) , #NEWLINE# 'current breakpoint focused source' : ( 'white' , 'dark red' ) , #NEWLINE# 'variables' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'variable separator' : ( 'dark cyan' , 'light gray' ) , #NEWLINE# 'var label' : ( 'dark blue' , 'dark cyan' ) , #NEWLINE# 'var value' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'focused var label' : ( 'dark blue' , 'dark green' ) , #NEWLINE# 'focused var value' : ( 'black' , 'dark green' ) , #NEWLINE# 'highlighted var label' : ( 'white' , 'dark cyan' ) , #NEWLINE# 'highlighted var value' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'focused highlighted var label' : ( 'white' , 'dark green' ) , #NEWLINE# 'focused highlighted var value' : ( 'black' , 'dark green' ) , #NEWLINE# 'return label' : ( 'white' , 'dark blue' ) , #NEWLINE# 'return value' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'focused return label' : ( 'light gray' , 'dark blue' ) , #NEWLINE# 'focused return value' : ( 'black' , 'dark green' ) , #NEWLINE# 'stack' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'frame name' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'focused frame name' : ( 'black' , 'dark green' ) , #NEWLINE# 'frame class' : ( 'dark blue' , 'dark cyan' ) , #NEWLINE# 'focused frame class' : ( 'dark blue' , 'dark green' ) , #NEWLINE# 'frame location' : ( 'light cyan' , 'dark cyan' ) , #NEWLINE# 'focused frame location' : ( 'light cyan' , 'dark green' ) , #NEWLINE# 'current frame name' : ( add_setting ( 'white' , 'bold' ) , 'dark cyan' ) , #NEWLINE# 'focused current frame name' : ( add_setting ( 'white' , 'bold' ) , 'dark green' , 'bold' ) , #NEWLINE# 'current frame class' : ( 'dark blue' , 'dark cyan' ) , #NEWLINE# 'focused current frame class' : ( 'dark blue' , 'dark green' ) , #NEWLINE# 'current frame location' : ( 'light cyan' , 'dark cyan' ) , #NEWLINE# 'focused current frame location' : ( 'light cyan' , 'dark green' ) , #NEWLINE# #UNINDENT# } #NEWLINE# if ( theme == 'classic' ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( theme == 'vim' ) : #NEWLINE# #INDENT# palette_dict . update ( { #NEWLINE# #INDENT# 'source' : ( 'black' , 'default' ) , #NEWLINE# 'keyword' : ( 'brown' , 'default' ) , #NEWLINE# 'kw_namespace' : ( 'dark magenta' , 'default' ) , #NEWLINE# 'literal' : ( 'black' , 'default' ) , #NEWLINE# 'string' : ( 'dark red' , 'default' ) , #NEWLINE# 'doublestring' : ( 'dark red' , 'default' ) , #NEWLINE# 'singlestring' : ( 'dark red' , 'default' ) , #NEWLINE# 'docstring' : ( 'dark red' , 'default' ) , #NEWLINE# 'punctuation' : ( 'black' , 'default' ) , #NEWLINE# 'comment' : ( 'dark blue' , 'default' ) , #NEWLINE# 'classname' : ( 'dark cyan' , 'default' ) , #NEWLINE# 'name' : ( 'dark cyan' , 'default' ) , #NEWLINE# 'line number' : ( 'dark gray' , 'default' ) , #NEWLINE# 'breakpoint marker' : ( 'dark red' , 'default' ) , #NEWLINE# 'command line edit' : ( 'black' , 'default' ) , #NEWLINE# 'command line prompt' : ( add_setting ( 'black' , 'bold' ) , 'default' ) , #NEWLINE# 'command line output' : ( add_setting ( 'black' , 'bold' ) , 'default' ) , #NEWLINE# 'command line input' : ( 'black' , 'default' ) , #NEWLINE# 'command line error' : ( add_setting ( 'light red' , 'bold' ) , 'default' ) , #NEWLINE# 'focused command line output' : ( 'black' , 'dark green' ) , #NEWLINE# 'focused command line input' : ( add_setting ( 'light cyan' , 'bold' ) , 'dark green' ) , #NEWLINE# 'focused command line error' : ( 'black' , 'dark green' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( theme == 'dark vim' ) : #NEWLINE# #INDENT# palette_dict . update ( { #NEWLINE# #INDENT# 'header' : ( 'black' , 'light gray' , 'standout' ) , #NEWLINE# 'variables' : ( 'black' , 'dark gray' ) , #NEWLINE# 'variable separator' : ( 'dark cyan' , 'light gray' ) , #NEWLINE# 'var label' : ( 'light gray' , 'dark gray' ) , #NEWLINE# 'var value' : ( 'white' , 'dark gray' ) , #NEWLINE# 'focused var label' : ( 'light gray' , 'light blue' ) , #NEWLINE# 'focused var value' : ( 'white' , 'light blue' ) , #NEWLINE# 'highlighted var label' : ( 'light gray' , 'dark green' ) , #NEWLINE# 'highlighted var value' : ( 'white' , 'dark green' ) , #NEWLINE# 'focused highlighted var label' : ( 'light gray' , 'light blue' ) , #NEWLINE# 'focused highlighted var value' : ( 'white' , 'light blue' ) , #NEWLINE# 'return label' : ( 'light gray' , 'dark gray' ) , #NEWLINE# 'return value' : ( 'light cyan' , 'dark gray' ) , #NEWLINE# 'focused return label' : ( 'yellow' , 'light blue' ) , #NEWLINE# 'focused return value' : ( 'white' , 'light blue' ) , #NEWLINE# 'stack' : ( 'black' , 'dark gray' ) , #NEWLINE# 'frame name' : ( 'light gray' , 'dark gray' ) , #NEWLINE# 'focused frame name' : ( 'light gray' , 'light blue' ) , #NEWLINE# 'frame class' : ( 'dark blue' , 'dark gray' ) , #NEWLINE# 'focused frame class' : ( 'dark blue' , 'light blue' ) , #NEWLINE# 'frame location' : ( 'white' , 'dark gray' ) , #NEWLINE# 'focused frame location' : ( 'white' , 'light blue' ) , #NEWLINE# 'current frame name' : ( add_setting ( 'white' , 'bold' ) , 'dark gray' ) , #NEWLINE# 'focused current frame name' : ( add_setting ( 'white' , 'bold' ) , 'light blue' , 'bold' ) , #NEWLINE# 'current frame class' : ( 'dark blue' , 'dark gray' ) , #NEWLINE# 'focused current frame class' : ( 'dark blue' , 'dark green' ) , #NEWLINE# 'current frame location' : ( 'light cyan' , 'dark gray' ) , #NEWLINE# 'focused current frame location' : ( 'light cyan' , 'light blue' ) , #NEWLINE# 'breakpoint' : ( 'light gray' , 'dark gray' ) , #NEWLINE# 'focused breakpoint' : ( 'light gray' , 'light blue' ) , #NEWLINE# 'current breakpoint' : ( add_setting ( 'white' , 'bold' ) , 'dark gray' ) , #NEWLINE# 'focused current breakpoint' : ( add_setting ( 'white' , 'bold' ) , 'light blue' ) , #NEWLINE# 'selectable' : ( 'light gray' , 'dark gray' ) , #NEWLINE# 'focused selectable' : ( 'white' , 'light blue' ) , #NEWLINE# 'button' : ( 'light gray' , 'dark gray' ) , #NEWLINE# 'focused button' : ( 'white' , 'light blue' ) , #NEWLINE# 'background' : ( 'black' , 'light gray' ) , #NEWLINE# 'hotkey' : ( add_setting ( 'black' , 'underline' ) , 'light gray' , 'underline' ) , #NEWLINE# 'focused sidebar' : ( 'light blue' , 'light gray' , 'standout' ) , #NEWLINE# 'warning' : ( add_setting ( 'white' , 'bold' ) , 'dark red' , 'standout' ) , #NEWLINE# 'label' : ( 'black' , 'light gray' ) , #NEWLINE# 'value' : ( 'white' , 'dark gray' ) , #NEWLINE# 'fixed value' : ( 'light gray' , 'dark gray' ) , #NEWLINE# 'search box' : ( 'white' , 'dark gray' ) , #NEWLINE# 'search not found' : ( 'white' , 'dark red' ) , #NEWLINE# 'dialog title' : ( add_setting ( 'white' , 'bold' ) , 'dark gray' ) , #NEWLINE# 'breakpoint marker' : ( 'dark red' , 'black' ) , #NEWLINE# 'breakpoint source' : ( 'light gray' , 'dark red' ) , #NEWLINE# 'breakpoint focused source' : ( 'black' , 'dark red' ) , #NEWLINE# 'current breakpoint source' : ( 'black' , 'dark red' ) , #NEWLINE# 'current breakpoint focused source' : ( 'white' , 'dark red' ) , #NEWLINE# 'source' : ( 'white' , 'black' ) , #NEWLINE# 'focused source' : ( 'white' , 'light blue' ) , #NEWLINE# 'highlighted source' : ( 'black' , 'dark magenta' ) , #NEWLINE# 'current source' : ( 'black' , 'light gray' ) , #NEWLINE# 'current focused source' : ( 'white' , 'dark cyan' ) , #NEWLINE# 'current highlighted source' : ( 'white' , 'dark cyan' ) , #NEWLINE# 'line number' : ( 'dark gray' , 'black' ) , #NEWLINE# 'keyword' : ( 'yellow' , 'black' ) , #NEWLINE# 'literal' : ( 'dark magenta' , 'black' ) , #NEWLINE# 'string' : ( 'dark magenta' , 'black' ) , #NEWLINE# 'doublestring' : ( 'dark magenta' , 'black' ) , #NEWLINE# 'singlestring' : ( 'dark magenta' , 'black' ) , #NEWLINE# 'docstring' : ( 'dark magenta' , 'black' ) , #NEWLINE# 'name' : ( 'light cyan' , 'black' ) , #NEWLINE# 'punctuation' : ( 'yellow' , 'black' ) , #NEWLINE# 'comment' : ( 'light blue' , 'black' ) , #NEWLINE# 'command line edit' : ( 'white' , 'black' ) , #NEWLINE# 'command line prompt' : ( add_setting ( 'yellow' , 'bold' ) , 'black' ) , #NEWLINE# 'command line output' : ( add_setting ( 'yellow' , 'bold' ) , 'black' ) , #NEWLINE# 'command line input' : ( 'white' , 'black' ) , #NEWLINE# 'command line error' : ( add_setting ( 'light red' , 'bold' ) , 'black' ) , #NEWLINE# 'focused command line output' : ( 'black' , 'light blue' ) , #NEWLINE# 'focused command line input' : ( add_setting ( 'light cyan' , 'bold' ) , 'light blue' ) , #NEWLINE# 'focused command line error' : ( 'black' , 'light blue' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( theme == 'midnight' ) : #NEWLINE# #INDENT# palette_dict . update ( { #NEWLINE# #INDENT# 'variables' : ( 'white' , 'default' ) , #NEWLINE# 'var label' : ( 'light blue' , 'default' ) , #NEWLINE# 'var value' : ( 'white' , 'default' ) , #NEWLINE# 'stack' : ( 'white' , 'default' ) , #NEWLINE# 'frame name' : ( 'white' , 'default' ) , #NEWLINE# 'frame class' : ( 'dark blue' , 'default' ) , #NEWLINE# 'frame location' : ( 'light cyan' , 'default' ) , #NEWLINE# 'current frame name' : ( add_setting ( 'white' , 'bold' ) , 'default' ) , #NEWLINE# 'current frame class' : ( 'dark blue' , 'default' ) , #NEWLINE# 'current frame location' : ( 'light cyan' , 'default' ) , #NEWLINE# 'focused frame name' : ( 'black' , 'dark green' ) , #NEWLINE# 'focused frame class' : ( add_setting ( 'white' , 'bold' ) , 'dark green' ) , #NEWLINE# 'focused frame location' : ( 'dark blue' , 'dark green' ) , #NEWLINE# 'focused current frame name' : ( 'black' , 'dark green' ) , #NEWLINE# 'focused current frame class' : ( add_setting ( 'white' , 'bold' ) , 'dark green' ) , #NEWLINE# 'focused current frame location' : ( 'dark blue' , 'dark green' ) , #NEWLINE# 'breakpoint' : ( 'default' , 'default' ) , #NEWLINE# 'search box' : ( 'default' , 'default' ) , #NEWLINE# 'source' : ( 'white' , 'default' ) , #NEWLINE# 'highlighted source' : ( 'white' , 'light cyan' ) , #NEWLINE# 'current source' : ( 'white' , 'light gray' ) , #NEWLINE# 'current focused source' : ( 'white' , 'brown' ) , #NEWLINE# 'line number' : ( 'light gray' , 'default' ) , #NEWLINE# 'keyword' : ( 'dark magenta' , 'default' ) , #NEWLINE# 'name' : ( 'white' , 'default' ) , #NEWLINE# 'literal' : ( 'dark cyan' , 'default' ) , #NEWLINE# 'string' : ( 'dark red' , 'default' ) , #NEWLINE# 'doublestring' : ( 'dark red' , 'default' ) , #NEWLINE# 'singlestring' : ( 'light blue' , 'default' ) , #NEWLINE# 'docstring' : ( 'light red' , 'default' ) , #NEWLINE# 'backtick' : ( 'light green' , 'default' ) , #NEWLINE# 'punctuation' : ( 'white' , 'default' ) , #NEWLINE# 'comment' : ( 'dark green' , 'default' ) , #NEWLINE# 'classname' : ( 'dark cyan' , 'default' ) , #NEWLINE# 'funcname' : ( 'white' , 'default' ) , #NEWLINE# 'breakpoint marker' : ( 'dark red' , 'default' ) , #NEWLINE# 'command line edit' : ( 'white' , 'default' ) , #NEWLINE# 'command line prompt' : ( add_setting ( 'white' , 'bold' ) , 'default' ) , #NEWLINE# 'command line output' : ( add_setting ( 'white' , 'bold' ) , 'default' ) , #NEWLINE# 'command line input' : ( add_setting ( 'white' , 'bold' ) , 'default' ) , #NEWLINE# 'command line error' : ( add_setting ( 'light red' , 'bold' ) , 'default' ) , #NEWLINE# 'focused command line output' : ( 'black' , 'dark green' ) , #NEWLINE# 'focused command line input' : ( add_setting ( 'white' , 'bold' ) , 'dark green' ) , #NEWLINE# 'focused command line error' : ( 'black' , 'dark green' ) , #NEWLINE# 'command line clear button' : ( add_setting ( 'white' , 'bold' ) , 'default' ) , #NEWLINE# 'command line focused button' : ( 'black' , 'light gray' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( theme == 'solarized' ) : #NEWLINE# #INDENT# palette_dict . update ( { #NEWLINE# #INDENT# 'header' : ( 'black' , 'light blue' , 'standout' ) , #NEWLINE# 'focused sidebar' : ( 'yellow' , 'light blue' , 'standout' ) , #NEWLINE# 'group head' : ( 'black' , 'light blue' ) , #NEWLINE# 'background' : ( 'black' , 'light blue' ) , #NEWLINE# 'label' : ( 'black' , 'light blue' ) , #NEWLINE# 'value' : ( 'white' , 'dark blue' ) , #NEWLINE# 'fixed value' : ( 'black' , 'light blue' ) , #NEWLINE# 'variables' : ( 'light blue' , 'default' ) , #NEWLINE# 'var label' : ( 'dark blue' , 'default' ) , #NEWLINE# 'var value' : ( 'light blue' , 'default' ) , #NEWLINE# 'focused var label' : ( 'white' , 'dark blue' ) , #NEWLINE# 'focused var value' : ( 'black' , 'dark blue' ) , #NEWLINE# 'highlighted var label' : ( 'white' , 'light green' ) , #NEWLINE# 'highlighted var value' : ( 'white' , 'light green' ) , #NEWLINE# 'focused highlighted var label' : ( 'white' , 'light green' ) , #NEWLINE# 'focused highlighted var value' : ( 'white' , 'light green' ) , #NEWLINE# 'stack' : ( 'light blue' , 'default' ) , #NEWLINE# 'frame name' : ( 'dark blue' , 'default' ) , #NEWLINE# 'frame class' : ( 'light blue' , 'default' ) , #NEWLINE# 'frame location' : ( 'light green' , 'default' ) , #NEWLINE# 'focused frame name' : ( 'white' , 'dark blue' ) , #NEWLINE# 'focused frame class' : ( 'black' , 'dark blue' ) , #NEWLINE# 'focused frame location' : ( 'dark gray' , 'dark blue' ) , #NEWLINE# 'focused current frame name' : ( 'white' , 'light green' ) , #NEWLINE# 'focused current frame class' : ( 'black' , 'light green' ) , #NEWLINE# 'focused current frame location' : ( 'dark gray' , 'light green' ) , #NEWLINE# 'current frame name' : ( 'white' , 'light green' ) , #NEWLINE# 'current frame class' : ( 'black' , 'light green' ) , #NEWLINE# 'current frame location' : ( 'dark gray' , 'light green' ) , #NEWLINE# 'breakpoint' : ( 'light blue' , 'default' ) , #NEWLINE# 'focused breakpoint' : ( 'white' , 'light green' ) , #NEWLINE# 'current breakpoint' : ( 'white' , 'dark blue' ) , #NEWLINE# 'focused current breakpoint' : ( 'white' , 'dark blue' ) , #NEWLINE# 'breakpoint source' : ( 'light blue' , 'black' ) , #NEWLINE# 'current breakpoint source' : ( 'black' , 'light green' ) , #NEWLINE# 'breakpoint focused source' : ( 'dark gray' , 'dark blue' ) , #NEWLINE# 'current breakpoint focused source' : ( 'black' , 'light green' ) , #NEWLINE# 'breakpoint marker' : ( 'dark red' , 'default' ) , #NEWLINE# 'search box' : ( 'default' , 'default' ) , #NEWLINE# 'source' : ( 'light blue' , 'default' ) , #NEWLINE# 'current source' : ( 'light gray' , 'light blue' ) , #NEWLINE# 'current focused source' : ( 'light gray' , 'light blue' ) , #NEWLINE# 'focused source' : ( 'dark gray' , 'dark blue' ) , #NEWLINE# 'current highlighted source' : ( 'black' , 'dark cyan' ) , #NEWLINE# 'highlighted source' : ( 'light blue' , 'black' ) , #NEWLINE# 'line number' : ( 'light blue' , 'default' ) , #NEWLINE# 'keyword' : ( 'dark green' , 'default' ) , #NEWLINE# 'name' : ( 'light blue' , 'default' ) , #NEWLINE# 'literal' : ( 'dark cyan' , 'default' ) , #NEWLINE# 'string' : ( 'dark cyan' , 'default' ) , #NEWLINE# 'doublestring' : ( 'dark cyan' , 'default' ) , #NEWLINE# 'singlestring' : ( 'light blue' , 'default' ) , #NEWLINE# 'docstring' : ( 'dark cyan' , 'default' ) , #NEWLINE# 'backtick' : ( 'light green' , 'default' ) , #NEWLINE# 'punctuation' : ( 'light blue' , 'default' ) , #NEWLINE# 'comment' : ( 'light green' , 'default' ) , #NEWLINE# 'classname' : ( 'dark blue' , 'default' ) , #NEWLINE# 'funcname' : ( 'dark blue' , 'default' ) , #NEWLINE# 'command line edit' : ( 'light blue' , 'default' ) , #NEWLINE# 'command line prompt' : ( 'light blue' , 'default' ) , #NEWLINE# 'command line output' : ( 'light blue' , 'default' ) , #NEWLINE# 'command line input' : ( 'light blue' , 'default' ) , #NEWLINE# 'command line error' : ( 'dark red' , 'default' ) , #NEWLINE# 'focused command line output' : ( 'black' , 'light green' ) , #NEWLINE# 'focused command line input' : ( 'black' , 'light green' ) , #NEWLINE# 'focused command line error' : ( 'dark red' , 'light blue' ) , #NEWLINE# 'command line clear button' : ( 'light blue' , 'default' ) , #NEWLINE# 'command line focused button' : ( 'black' , 'light blue' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( theme == 'agr-256' ) : #NEWLINE# #INDENT# palette_dict . update ( { #NEWLINE# #INDENT# 'header' : ( 'h235' , 'h252' , 'standout' ) , #NEWLINE# 'variables' : ( 'h235' , 'h233' ) , #NEWLINE# 'variable separator' : ( 'h23' , 'h252' ) , #NEWLINE# 'var label' : ( 'h111' , 'h233' ) , #NEWLINE# 'var value' : ( 'h255' , 'h233' ) , #NEWLINE# 'focused var label' : ( 'h192' , 'h24' ) , #NEWLINE# 'focused var value' : ( 'h192' , 'h24' ) , #NEWLINE# 'highlighted var label' : ( 'h252' , 'h22' ) , #NEWLINE# 'highlighted var value' : ( 'h255' , 'h22' ) , #NEWLINE# 'focused highlighted var label' : ( 'h252' , 'h64' ) , #NEWLINE# 'focused highlighted var value' : ( 'h255' , 'h64' ) , #NEWLINE# 'return label' : ( 'h113' , 'h233' ) , #NEWLINE# 'return value' : ( 'h113' , 'h233' ) , #NEWLINE# 'focused return label' : ( add_setting ( 'h192' , 'bold' ) , 'h24' ) , #NEWLINE# 'focused return value' : ( 'h192' , 'h24' ) , #NEWLINE# 'stack' : ( 'h235' , 'h233' ) , #NEWLINE# 'frame name' : ( 'h192' , 'h233' ) , #NEWLINE# 'focused frame name' : ( 'h192' , 'h24' ) , #NEWLINE# 'frame class' : ( 'h111' , 'h233' ) , #NEWLINE# 'focused frame class' : ( 'h192' , 'h24' ) , #NEWLINE# 'frame location' : ( 'h252' , 'h233' ) , #NEWLINE# 'focused frame location' : ( 'h192' , 'h24' ) , #NEWLINE# 'current frame name' : ( 'h255' , 'h22' ) , #NEWLINE# 'focused current frame name' : ( 'h255' , 'h64' ) , #NEWLINE# 'current frame class' : ( 'h111' , 'h22' ) , #NEWLINE# 'focused current frame class' : ( 'h255' , 'h64' ) , #NEWLINE# 'current frame location' : ( 'h252' , 'h22' ) , #NEWLINE# 'focused current frame location' : ( 'h255' , 'h64' ) , #NEWLINE# 'breakpoint' : ( 'h80' , 'h233' ) , #NEWLINE# 'focused breakpoint' : ( 'h192' , 'h24' ) , #NEWLINE# 'current breakpoint' : ( add_setting ( 'h255' , 'bold' ) , 'h22' ) , #NEWLINE# 'focused current breakpoint' : ( add_setting ( 'h255' , 'bold' ) , 'h64' ) , #NEWLINE# 'selectable' : ( 'h252' , 'h235' ) , #NEWLINE# 'focused selectable' : ( 'h255' , 'h24' ) , #NEWLINE# 'button' : ( 'h252' , 'h235' ) , #NEWLINE# 'focused button' : ( 'h255' , 'h24' ) , #NEWLINE# 'background' : ( 'h235' , 'h252' ) , #NEWLINE# 'hotkey' : ( add_setting ( 'h235' , 'underline' ) , 'h252' , 'underline' ) , #NEWLINE# 'focused sidebar' : ( 'h23' , 'h252' , 'standout' ) , #NEWLINE# 'warning' : ( add_setting ( 'h255' , 'bold' ) , 'h124' , 'standout' ) , #NEWLINE# 'label' : ( 'h235' , 'h252' ) , #NEWLINE# 'value' : ( 'h255' , 'h17' ) , #NEWLINE# 'fixed value' : ( 'h252' , 'h17' ) , #NEWLINE# 'group head' : ( add_setting ( 'h25' , 'bold' ) , 'h252' ) , #NEWLINE# 'search box' : ( 'h255' , 'h235' ) , #NEWLINE# 'search not found' : ( 'h255' , 'h124' ) , #NEWLINE# 'dialog title' : ( add_setting ( 'h255' , 'bold' ) , 'h235' ) , #NEWLINE# 'breakpoint marker' : ( 'h160' , 'h235' ) , #NEWLINE# 'breakpoint source' : ( 'h252' , 'h124' ) , #NEWLINE# 'breakpoint focused source' : ( 'h192' , 'h124' ) , #NEWLINE# 'current breakpoint source' : ( 'h192' , 'h124' ) , #NEWLINE# 'current breakpoint focused source' : ( add_setting ( 'h192' , 'bold' ) , 'h124' ) , #NEWLINE# 'source' : ( 'h255' , 'h235' ) , #NEWLINE# 'focused source' : ( 'h192' , 'h24' ) , #NEWLINE# 'highlighted source' : ( 'h252' , 'h22' ) , #NEWLINE# 'current source' : ( add_setting ( 'h252' , 'bold' ) , 'h23' ) , #NEWLINE# 'current focused source' : ( add_setting ( 'h192' , 'bold' ) , 'h23' ) , #NEWLINE# 'current highlighted source' : ( 'h255' , 'h22' ) , #NEWLINE# 'line number' : ( 'h241' , 'h235' ) , #NEWLINE# 'keyword' : ( 'h111' , 'h235' ) , #NEWLINE# 'literal' : ( 'h173' , 'h235' ) , #NEWLINE# 'string' : ( 'h113' , 'h235' ) , #NEWLINE# 'doublestring' : ( 'h113' , 'h235' ) , #NEWLINE# 'singlestring' : ( 'h113' , 'h235' ) , #NEWLINE# 'docstring' : ( 'h113' , 'h235' ) , #NEWLINE# 'name' : ( 'h192' , 'h235' ) , #NEWLINE# 'punctuation' : ( 'h223' , 'h235' ) , #NEWLINE# 'comment' : ( 'h246' , 'h235' ) , #NEWLINE# 'command line edit' : ( 'h255' , 'h233' ) , #NEWLINE# 'command line prompt' : ( add_setting ( 'h192' , 'bold' ) , 'h233' ) , #NEWLINE# 'command line output' : ( 'h80' , 'h233' ) , #NEWLINE# 'command line input' : ( 'h255' , 'h233' ) , #NEWLINE# 'command line error' : ( 'h160' , 'h233' ) , #NEWLINE# 'focused command line output' : ( add_setting ( 'h192' , 'bold' ) , 'h24' ) , #NEWLINE# 'focused command line input' : ( 'h255' , 'h24' ) , #NEWLINE# 'focused command line error' : ( 'h235' , 'h24' ) , #NEWLINE# 'command line clear button' : ( add_setting ( 'h255' , 'bold' ) , 'h233' ) , #NEWLINE# 'command line focused button' : ( 'h255' , 'h24' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# symbols = { #NEWLINE# #INDENT# 'palette' : palette_dict , #NEWLINE# 'add_setting' : add_setting , #NEWLINE# #UNINDENT# } #NEWLINE# from os.path import expanduser , expandvars #NEWLINE# execfile ( expanduser ( expandvars ( theme ) ) , symbols ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# print ( 'Error when importing theme:' ) #NEWLINE# from traceback import print_exc #NEWLINE# print_exc ( ) #NEWLINE# raw_input ( 'Hit enter:' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# palette_list = [ ] #NEWLINE# for ( setting_name , color_values ) in palette_dict . items ( ) : #NEWLINE# #INDENT# fg_color = color_values [ 0 ] . lower ( ) . strip ( ) #NEWLINE# bg_color = color_values [ 1 ] . lower ( ) . strip ( ) #NEWLINE# if ( fg_color . startswith ( 'h' ) or bg_color . startswith ( 'h' ) ) : #NEWLINE# #INDENT# attr = urwid . AttrSpec ( fg_color , bg_color , colors = 256 ) #NEWLINE# palette_list . append ( ( setting_name , 'default' , 'default' , 'default' , attr . foreground , attr . background ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# palette_list . append ( ( ( setting_name , ) + color_values ) ) #NEWLINE# #UNINDENT# #UNINDENT# return palette_list