def color_latex_def(name, color):
    # name = name.replace("-", "_")
    color = color.strip("#")
    return "\\definecolor{" + name + "}{HTML}{" + color + "}"

def generate_latex_colorscheme(palette):
    s = ""
    for n, c in palette.items():
        s += color_latex_def(n, c) + "\n"
    return s
