Get a color config object with all the defaults.
182262
def get_default_color_config():
    """"""
    result = ColorConfig(
        pound=DEFAULT_COLOR_POUND,
        heading=DEFAULT_COLOR_HEADING,
        code=DEFAULT_COLOR_CODE,
        backticks=DEFAULT_COLOR_BACKTICKS,
        prompt=DEFAULT_COLOR_PROMPT,
        pound_reset=DEFAULT_COLOR_POUND_RESET,
        heading_reset=DEFAULT_COLOR_HEADING_RESET,
        code_reset=DEFAULT_COLOR_CODE_RESET,
        backticks_reset=DEFAULT_COLOR_BACKTICKS_RESET,
        prompt_reset=DEFAULT_COLOR_PROMPT_RESET
    )
    return result
387472
def _set_config(c):
    """"""
    gl_attribs = [glcanvas.WX_GL_RGBA,
                  glcanvas.WX_GL_DEPTH_SIZE, c['depth_size'],
                  glcanvas.WX_GL_STENCIL_SIZE, c['stencil_size'],
                  glcanvas.WX_GL_MIN_RED, c['red_size'],
                  glcanvas.WX_GL_MIN_GREEN, c['green_size'],
                  glcanvas.WX_GL_MIN_BLUE, c['blue_size'],
                  glcanvas.WX_GL_MIN_ALPHA, c['alpha_size']]
    gl_attribs += [glcanvas.WX_GL_DOUBLEBUFFER] if c['double_buffer'] else []
    gl_attribs += [glcanvas.WX_GL_STEREO] if c['stereo'] else []
    return gl_attribs
492593
def defaults(self):
        
        defaults = ConfigParser.defaults(self).copy()
        for key, val in iteritems(defaults):
            defaults[key] = self.get('DEFAULT', key) or val
        return defaults
531476
def _get_color_list():
    """"""
    if 'axes.prop_cycle' in plt.rcParams:
        return [p['color'] for p in list(plt.rcParams['axes.prop_cycle'])]
    else:
        return plt.rcParams['axes.color_cycle']
287935
function generateColors(conf) {
  for (var key in conf.color) {
    if (typeof conf.color[key] !== 'string') continue;
    conf.color[key] = new Color(conf.color[key]);
  }
  return conf;
}
1327696
def colors
    config[:color] ||= {
      Numeric    => :red    ,
      String     => :green  ,
      Symbol     => :cyan   ,
      Array      => :blue   ,
      Hash       => :blue   ,
      NilClass   => :magenta,
      TrueClass  => :magenta,
      FalseClass => :magenta,
      Exception  => :magenta,
      Object     => :yellow }
  end
253715
def get_colors():
    """"""
    if exists( THEMEDIR ):
        contents = os.listdir( THEMEDIR )
        themes = [theme for theme in contents if '.' not in theme]
        if len(themes) > 0:
            themes.sort()
            return themes
        else:
            print "** No themes in themedir **"
            print "    run:"
            print "        dotcolors (-s | --sync) <limit>"
            sys.exit(0)
    else:
        print "** Theme directory not found **"
        print "    run: "
        print "        dotcolors --setup"

        sys.exit(0)
906215
def get_config():
    """"""
    config_path = path.join(
        (os.environ.get('TLDR_CONFIG_DIR') or path.expanduser('~')),
        '.tldrrc')
    if not path.exists(config_path):
        sys.exit("Can't find config file at: {0}. You may use `tldr init` "
                 "to init the config file.".format(config_path))

    with io.open(config_path, encoding='utf-8') as f:
        try:
            config = yaml.safe_load(f)
        except yaml.scanner.ScannerError:
            sys.exit("The config file is not a valid YAML file.")

    supported_colors = ['black', 'red', 'green', 'yellow', 'blue',
                        'magenta', 'cyan', 'white']
    if not set(config['colors'].values()).issubset(set(supported_colors)):
        sys.exit("Unsupported colors in config file: {0}.".format(
            ', '.join(set(config['colors'].values()) - set(supported_colors))))
    if not path.exists(config['repo_directory']):
        sys.exit("Can't find the tldr repo, check the `repo_directory` "
                 "setting in config file.")

    return config
969228
def get_default_config(self):
        
        config = super(LoadAverageCollector, self).get_default_config()
        config.update({
            'path':     'loadavg',
            'simple':   'False'
        })
        return config
209668
def disable_colors():
    
    for i in CONF["COLORS"]:
        if isinstance(CONF["COLORS"][i], dict):
            for j in CONF["COLORS"][i]:
                CONF["COLORS"][i][j] = Color.normal
        else:
            CONF["COLORS"][i] = Color.normal
701883
def get_empty_config():
    
    empty_color_config = get_empty_color_config()
    result = Config(
        examples_dir=None,
        custom_dir=None,
        color_config=empty_color_config,
        use_color=None,
        pager_cmd=None,
        editor_cmd=None,
        squeeze=None,
        subs=None
    )
    return result
409950
protected function getDefaultColors()
    {
        $colors = [
            [
                'name' => 'Pale pink',
                'color' => '#f78da7'
            ],
            [
                'name' => 'Vivid red',
                'color' => '#cf2e2e'
            ],
            [
                'name' => 'Luminous vivid orange',
                'color' => '#ff6900'
            ],
            [
                'name' => 'Luminous vivid amber',
                'color' => '#fcb900'
            ],
            [
                'name' => 'Light green cyan',
                'color' => '#7bdcb5'
            ],
            [
                'name' => 'Vivid green cyan',
                'color' => '#00d084'
            ],
            [
                'name' => 'Pale cyan blue',
                'color' => '#8ed1fc'
            ],
            [
                'name' => 'Vivid cyan blue',
                'color' => '#0693e3'
            ],
            [
                'name' => 'Very light gray',
                'color' => '#eeeeee'
            ],
            [
                'name' => 'Cyan bluish gray',
                'color' => '#abb8c3'
            ],
            [
                'name' => 'Very dark gray',
                'color' => '#313131'
            ]
        ];

        return array_map(function (array $color) {
            return [
                'name' => function_exists('__') ? __($color['name'], Application::TEXTDOMAIN) : $color['name'],
                'color' => $color['color']
            ];
        }, $colors);
    }
672646
def _get_colors(self, color_set, alpha, off_color, custom_colors={}):
        
        import matplotlib as mpl
        import matplotlib.pyplot as plt
        color_list = [off_color] * len(self.hkl_list)
        color_proxy_on_wulff = []
        miller_on_wulff = []
        e_surf_on_wulff = [(i, e_surf)
                           for i, e_surf in enumerate(self.e_surf_list)
                           if self.on_wulff[i]]

        c_map = plt.get_cmap(color_set)
        e_surf_on_wulff.sort(key=lambda x: x[1], reverse=False)
        e_surf_on_wulff_list = [x[1] for x in e_surf_on_wulff]
        if len(e_surf_on_wulff) > 1:
            cnorm = mpl.colors.Normalize(vmin=min(e_surf_on_wulff_list),
                                         vmax=max(e_surf_on_wulff_list))
        else:
            # if there is only one hkl on wulff, choose the color of the median
            cnorm = mpl.colors.Normalize(vmin=min(e_surf_on_wulff_list) - 0.1,
                                         vmax=max(e_surf_on_wulff_list) + 0.1)
        scalar_map = mpl.cm.ScalarMappable(norm=cnorm, cmap=c_map)

        for i, e_surf in e_surf_on_wulff:
            color_list[i] = scalar_map.to_rgba(e_surf, alpha=alpha)
            if tuple(self.miller_list[i]) in custom_colors.keys():
                color_list[i] = custom_colors[tuple(self.miller_list[i])]
            color_proxy_on_wulff.append(
                plt.Rectangle((2, 2), 1, 1, fc=color_list[i], alpha=alpha))
            miller_on_wulff.append(self.input_miller_fig[i])
        scalar_map.set_array([x[1] for x in e_surf_on_wulff])
        color_proxy = [plt.Rectangle((2, 2), 1, 1, fc=x, alpha=alpha)
                       for x in color_list]

        return color_list, color_proxy, color_proxy_on_wulff, miller_on_wulff, \
            e_surf_on_wulff_list
657575
def resolve_colors(self, colorstack):
        ''
        attr = CursesAttr()
        for coloropt in colorstack:
            c = self.get_color(coloropt)
            attr = attr.update_attr(c)
        return attr
466807
def console_get_default_foreground(con: tcod.console.Console) -> Color:
    
    return Color._new_from_cdata(
        lib.TCOD_console_get_default_foreground(_console(con))
    )
418766
def default_fg(self) -> Tuple[int, int, int]:
        """"""
        color = self._console_data.fore
        return color.r, color.g, color.b
1154693
def get_config(self):
        
        # Fill this dict with config data
        return {
            'hash_name': self.hash_name,
            'dim': self.dim,
            'bin_width': self.bin_width,
            'projection_count': self.projection_count,
            'normals': self.normals
        }