pub fn simplify_palette(colors: &[Color], threshold: usize) -> Vec<Color>
Expand description
merges similar colors that fall with threshold of each other will remove gradients if threshold is too high or gradient too smooth
recommend starting threshold at 2, max is 1020 the result will contain duplicates so the index is preserved