Function exoquant::generate_palette [] [src]

pub fn generate_palette<C, O>(hist: &Histogram, colorspace: &C, optimizer: &O, num_colors: usize) -> Vec<Color> where C: ColorSpace, O: Optimizer

A convenience function to just generate a palette from a historam with sensible defaults.

Examples:

let palette = generate_palette(&histogram, &SimpleColorSpace::default(), &optimizer::KMeans,
  256);