Function simplify_palette_to_fit

Source
pub fn simplify_palette_to_fit(colors: &[Color], max: usize) -> Vec<Color>
Expand description

merges similar colors until there are < max unique colors the result will contain duplicates so the index is preserved