def plot_colortable(colors, title='35 Unique Colors'):
    """
	
	copy from https://matplotlib.org/3.1.0/gallery/color/named_colors.html
	
	colors: dict [name] = [hex]
	
	"""
    import matplotlib
    matplotlib.use('agg')
    import matplotlib.pyplot as plt
    import matplotlib.colors as mcolors
    cell_width = 300
    cell_height = 50
    swatch_width = 48
    margin = 12
    topmargin = 40
    names = list(colors)
    n = len(names)
    ncols = 3
    nrows = 11
    width = cell_width * 4
    height = cell_height * nrows + margin + topmargin
    dpi = 100
    fig, ax = plt.subplots(figsize=(width / dpi, height / dpi), dpi=dpi)
    fig.subplots_adjust(left=0.1, right=0.9, bottom=0.1, top=0.9)
    ax.set_xlim(0, cell_width * 4)
    ax.set_ylim(cell_height * (nrows - 0.5), -cell_height / 2.0)
    ax.yaxis.set_visible(False)
    ax.xaxis.set_visible(False)
    ax.set_axis_off()
    ax.set_title(title, fontsize=24, loc='left')
    for i, name in enumerate(names):
        row = i % nrows
        col = i // nrows
        y = row * cell_height
        swatch_start_x = cell_width * col
        swatch_end_x = cell_width * col + swatch_width
        text_pos_x = cell_width * col + swatch_width + 7
        ax.text(text_pos_x, y, name, fontsize=14, horizontalalignment=
            'left', verticalalignment='center')
        ax.hlines(y, swatch_start_x, swatch_end_x, color=colors[name],
            linewidth=18)
    return fig
