reorder_palette

Function reorder_palette 

Source
pub fn reorder_palette(palette: &Palette) -> (Palette, Vec<u8>)
Expand description

Reorders the palette using a greedy TSP approximation. Returns (new_palette, index_mapping) where index_mapping[old_idx] = new_idx.