def _flatten_palettes(palettes):
    flattened = {}
    palettes = _merge_palettes(palettes)
    for palette in palettes:
        flat = [i for sub in palettes[palette].values() for i in sub]
        flattened.update({palette: flat})
    return flattened
Convert palette mappings into color list.
dataset/ETHPy150Open JuanPotato/Legofy/legofy/palettes.py/_flatten_palettes