Struct exoquant::ColorMap [] [src]

pub struct ColorMap { /* fields omitted */ }

A data structure for fast nearest color lookups in a palette.

Methods

impl ColorMap
[src]

Create a ColorMap from a slice of Colors.

Create a ColorMap from float colors.

Returns the index of the nearest color in the palette.

Returns the distance to the closest neighbor color of a palette entry given by index.

Returns the list of neighbors (as indices) for a palette color given by index.

Returns the palette color for the given index.

Returns the number of colors in the palette.