def color_style():
 if (not supports_color()):
  style = no_style()
 else:
  SPIDER_COLORS = os.environ.get('SPIDER_COLORS', '')
  color_settings = termcolors.parse_color_setting(SPIDER_COLORS)
  if color_settings:
   class dummy:
    pass
   style = dummy()
   for role in termcolors.PALETTES[termcolors.NOCOLOR_PALETTE]:
    format = color_settings.get(role, {})
    setattr(style, role, termcolors.make_style(**format))
   style.ERROR_OUTPUT = style.ERROR
  else:
   style = no_style()
 return style

def color_style ( ) : if ( not supports_color ( ) ) : style = no_style ( ) else : SPIDER_COLORS = os . environ . get ( 'SPIDER_COLORS' , '' ) color_settings = termcolors . parse_color_setting ( SPIDER_COLORS ) if color_settings : class dummy : pass style = dummy ( ) for role in termcolors . PALETTES [ termcolors . NOCOLOR_PALETTE ] : format = color_settings . get ( role , { } ) setattr ( style , role , termcolors . make_style ( ** format ) ) style . ERROR_OUTPUT = style . ERROR else : style = no_style ( ) return style
returns a style object with the django color scheme .