pub fn quantize<C: ColorIndex>(palette: &Palette<C>, color: Rgba) -> CExpand description
Find the palette entry closest to color.
Distance is summed squared channel difference over all four channels
(r, g, b, a), so transparent palette entries only win for transparent
input colors. Only the first palette.count entries are considered;
ties prefer the lower index.