Return colors for a given scheme. Default colors are returned for an item
    if undefined in scheme.
333825
def get_color_palette(scheme):
    
    color_schemes = {
        'default': {
            'frames': ['tomato', 'limegreen', 'deepskyblue'], 'background': '#ffffff',
            'color': '#616161', 'ticks': '#757575', 'start': '#ffffff', 'stop': '#909090',
            'rna': '#eaeaea', 'axis': '#e0e0e0', 'grey': '#bdbdbd'
        },
        'colorbrewer': {
            'frames': ['#fc8d62', '#66c2a5', '#8da0cb']
        },
        'rgb': {
            'frames': ['red', 'green', 'blue']
        },
        'greyorfs': {}
    }

    colors = {}
    for k, v in color_schemes['default'].items():
        try:
            vals = color_schemes[scheme][k]
        except KeyError:
            vals = v
        colors[k] = vals
    return colors
149966
def get_paths(scheme=_get_default_scheme(), vars=None, expand=True):
    
    _ensure_cfg_read()
    if expand:
        return _expand_vars(scheme, vars)
    else:
        return dict(_SCHEMES.items(scheme))
224360
def set_color_scheme(self, color_scheme, reset=True):
        """"""
        # Needed to handle not initialized kernel_client
        # See issue 6996
        try:
            self.shellwidget.set_color_scheme(color_scheme, reset)
        except AttributeError:
            pass
1237190
function getColorGroups(colors) {
  var colorGroups = [];

  colors.forEach(function (color) {
    if (colorGroups.indexOf(color.group) < 0) {
      colorGroups.push(color.group);
    }
  });

  return colorGroups;
}
764682
def color(self, color):
        
        if color is None:
            color = 0xFFFFFFFF

        idc.SetColor(self.ea, idc.CIC_ITEM, color)
626669
def compute_colors_for_labels(self, labels):
        
        colors = labels[:, None] * self.palette
        colors = (colors % 255).numpy().astype("uint8")
        return colors
628463
function( num ){
           var list = new ColorList();
           for( var i = 0; i < num; i++) {
               list.add( this.getColor() );
            }
           return list;
        }
851559
def getColor(value, default=None):
    

    if isinstance(value, Color):
        return value
    value = str(value).strip().lower()
    if value == "transparent" or value == "none":
        return default
    if value in COLOR_BY_NAME:
        return COLOR_BY_NAME[value]
    if value.startswith("#") and len(value) == 4:
        value = "#" + value[1] + value[1] + \
            value[2] + value[2] + value[3] + value[3]
    elif rgb_re.search(value):
        # e.g., value = "<css function: rgb(153, 51, 153)>", go figure:
        r, g, b = [int(x) for x in rgb_re.search(value).groups()]
        value = "#%02x%02x%02x" % (r, g, b)
    else:
        # Shrug
        pass

    return toColor(value, default)
610811
def color(self, color=None):
        """"""

        if color is None:
            return self._color
        else:
            if not isinstance(color, str):
                raise TypeError("color must be str, not '%s'" % str(color))
            self._color = color
341959
def reset_to_default(self):
        """"""
        # Checks that this is indeed a default scheme
        scheme = self.current_scheme
        names = self.get_option('names')
        if scheme in names:
            for key in syntaxhighlighters.COLOR_SCHEME_KEYS:
                option = "{0}/{1}".format(scheme, key)
                value = CONF.get_default(self.CONF_SECTION, option)
                self.set_option(option, value)

            self.load_from_conf()
912986
def get(img, light=False):
    """"""
    if not shutil.which("schemer2"):
        logging.error("Schemer2 wasn't found on your system.")
        logging.error("Try another backend. (wal --backend)")
        sys.exit(1)

    cols = [col.decode('UTF-8') for col in gen_colors(img)]
    return adjust(cols, light)
205387
function useColors() {
	return 'colors' in exports.inspectOpts ?
		Boolean(exports.inspectOpts.colors) :
		tty.isatty(process.stderr.fd);
}
1092361
def get_color_name(value):
    """"""
    if not is_known_type(value):
        return CUSTOM_TYPE_COLOR
    for typ, name in list(COLORS.items()):
        if isinstance(value, typ):
            return name
    else:
        np_dtype = get_numpy_dtype(value)
        if np_dtype is None or not hasattr(value, 'size'):
            return UNSUPPORTED_COLOR
        elif value.size == 1:
            return SCALAR_COLOR
        else:
            return ARRAY_COLOR
169454
def _kml_default_colors(x):
    
    x = max([x, 0])
    colors_arr = [simplekml.Color.red, simplekml.Color.green, simplekml.Color.blue,
                  simplekml.Color.violet, simplekml.Color.yellow, simplekml.Color.orange,
                  simplekml.Color.burlywood, simplekml.Color.azure, simplekml.Color.lightblue,
                  simplekml.Color.lawngreen, simplekml.Color.indianred, simplekml.Color.hotpink]
    return colors_arr[x]
1986
function getDefaultPortFromScheme( scheme ) {
  var port = null;
  if ( scheme === 'ftp') {
    port = 21;
  }
  else if ( scheme === 'gopher' ) {
    port = 70;
  }
  else if ( scheme === 'http' || scheme === 'ws' ) {
    port = 80;
  }
  else if ( scheme === 'https' || scheme === 'wss' ) {
    port = 443;
  }
  return port;
}
852345
def lookup_color(p_color):
    
    if not lookup_color.colors:
        lookup_color.colors[AbstractColor.NEUTRAL] = Color('NEUTRAL')
        lookup_color.colors[AbstractColor.PROJECT] = config().project_color()
        lookup_color.colors[AbstractColor.CONTEXT] = config().context_color()
        lookup_color.colors[AbstractColor.META] = config().metadata_color()
        lookup_color.colors[AbstractColor.LINK] = config().link_color()

    try:
        return lookup_color.colors[p_color]
    except KeyError:
        return p_color
1239686
def get_edited_color_scheme(self):
        
        color_scheme = {}
        scheme_name = self.last_used_scheme

        for key in self.widgets[scheme_name]:
            items = self.widgets[scheme_name][key]

            if len(items) == 1:
                # ColorLayout
                value = items[0].text()
            else:
                # ColorLayout + checkboxes
                value = (items[0].text(), items[1].isChecked(),
                         items[2].isChecked())

            color_scheme[key] = value

        return color_scheme