Function buffer_graphics_lib::prelude::palette::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