(text)
Set color options of Text widget.

    If ColorDelegator is used, this should be called first.
Set color options of Text widget.
Set color options of Text widget .
def color_config(text):
    """Set color options of Text widget.

    If ColorDelegator is used, this should be called first.
    """
    # Called from htest, TextFrame, Editor, and Turtledemo.
    # Not automatic because ColorDelegator does not know 'text'.
    theme = idleConf.CurrentTheme()
    normal_colors = idleConf.GetHighlight(theme, 'normal')
    cursor_color = idleConf.GetHighlight(theme, 'cursor')['foreground']
    select_colors = idleConf.GetHighlight(theme, 'hilite')
    text.config(
        foreground=normal_colors['foreground'],
        background=normal_colors['background'],
        insertbackground=cursor_color,
        selectforeground=select_colors['foreground'],
        selectbackground=select_colors['background'],
        inactiveselectbackground=select_colors['background'],  # new in 8.5
        )
def color_config ( text ) : # Called from htest, TextFrame, Editor, and Turtledemo. # Not automatic because ColorDelegator does not know 'text'. theme = idleConf . CurrentTheme ( ) normal_colors = idleConf . GetHighlight ( theme , 'normal' ) cursor_color = idleConf . GetHighlight ( theme , 'cursor' ) [ 'foreground' ] select_colors = idleConf . GetHighlight ( theme , 'hilite' ) text . config ( foreground = normal_colors [ 'foreground' ] , background = normal_colors [ 'background' ] , insertbackground = cursor_color , selectforeground = select_colors [ 'foreground' ] , selectbackground = select_colors [ 'background' ] , inactiveselectbackground = select_colors [ 'background' ] , # new in 8.5 )