'Initialize a colorscheme.'

def __init__(self, colorscheme_config, colors_config):

    self.colors = {}
    self.gradients = {}
    self.groups = colorscheme_config[u'groups']
    self.translations = colorscheme_config.get(u'mode_translations', {})
    for (color_name, color) in colors_config[u'colors'].items():
        try:
            self.colors[color_name] = (color[0], int(color[1], 16))
        except TypeError:
            self.colors[color_name] = (color, cterm_to_hex[color])
    for (gradient_name, gradient) in colors_config[u'gradients'].items():
        if (len(gradient) == 2):
            self.gradients[gradient_name] = (gradient[0], [int(color, 16) for color in gradient[1]])
        else:
            self.gradients[gradient_name] = (gradient[0], [cterm_to_hex[color] for color in gradient[0]])
