(self)
Handle button to select a new color for the target tag.

        If a new color is selected while using a builtin theme, a
        name must be supplied to create a custom theme.

        Attributes accessed:
            highlight_target
            frame_color_set
            theme_source

        Attributes updated:
            color

        Methods:
            get_new_theme_name
            create_new
Handle button to select a new color for the target tag.
Handle button to select a new color for the target tag .
def get_color(self):
        """Handle button to select a new color for the target tag.

        If a new color is selected while using a builtin theme, a
        name must be supplied to create a custom theme.

        Attributes accessed:
            highlight_target
            frame_color_set
            theme_source

        Attributes updated:
            color

        Methods:
            get_new_theme_name
            create_new
        """
        target = self.highlight_target.get()
        prev_color = self.style.lookup(self.frame_color_set['style'],
                                       'background')
        rgbTuplet, color_string = colorchooser.askcolor(
                parent=self, title='Pick new color for : '+target,
                initialcolor=prev_color)
        if color_string and (color_string != prev_color):
            # User didn't cancel and they chose a new color.
            if self.theme_source.get():  # Current theme is a built-in.
                message = ('Your changes will be saved as a new Custom Theme. '
                           'Enter a name for your new Custom Theme below.')
                new_theme = self.get_new_theme_name(message)
                if not new_theme:  # User cancelled custom theme creation.
                    return
                else:  # Create new custom theme based on previously active theme.
                    self.create_new(new_theme)
                    self.color.set(color_string)
            else:  # Current theme is user defined.
                self.color.set(color_string)
def get_color ( self ) : target = self . highlight_target . get ( ) prev_color = self . style . lookup ( self . frame_color_set [ 'style' ] , 'background' ) rgbTuplet , color_string = colorchooser . askcolor ( parent = self , title = 'Pick new color for : ' + target , initialcolor = prev_color ) if color_string and ( color_string != prev_color ) : # User didn't cancel and they chose a new color. if self . theme_source . get ( ) : # Current theme is a built-in. message = ( 'Your changes will be saved as a new Custom Theme. ' 'Enter a name for your new Custom Theme below.' ) new_theme = self . get_new_theme_name ( message ) if not new_theme : # User cancelled custom theme creation. return else : # Create new custom theme based on previously active theme. self . create_new ( new_theme ) self . color . set ( color_string ) else : # Current theme is user defined. self . color . set ( color_string )