'Returns colorscale used for dendrogram tree clusters.
:param (list) colorscale: Colors to use for the plot in rgb format.
:rtype (dict): A dict of default colors mapped to the user colorscale.'

def get_color_dict(self, colorscale):

    d = {'r': 'red', 'g': 'green', 'b': 'blue', 'c': 'cyan', 'm': 'magenta', 'y': 'yellow', 'k': 'black', 'w': 'white'}
    default_colors = OrderedDict(sorted(d.items(), key=(lambda t: t[0])))
    if (colorscale is None):
        colorscale = ['rgb(0,116,217)', 'rgb(35,205,205)', 'rgb(61,153,112)', 'rgb(40,35,35)', 'rgb(133,20,75)', 'rgb(255,65,54)', 'rgb(255,255,255)', 'rgb(255,220,0)']
    for i in range(len(default_colors.keys())):
        k = list(default_colors.keys())[i]
        if (i < len(colorscale)):
            default_colors[k] = colorscale[i]
    return default_colors
