/// <inheritdoc /> public override int GetPaletteIndex(Color color) { var candidates = _root.GetPaletteIndex(color, 0); var candidateColors = candidates.Values.ToArray(); var colorIndex = EuclideanHelper.GetSmallestEuclideanDistanceIndex(candidateColors, color); return(candidates.ElementAt(colorIndex).Key); }
private int CalculatePaletteIndexInternal(Color color) { return(EuclideanHelper.GetSmallestEuclideanDistanceIndex(Palette, color)); }