Trait nannou::image::imageops::colorops::ColorMap[][src]

pub trait ColorMap {
    type Color;
    fn index_of(&self, color: &Self::Color) -> usize;
fn map_color(&self, color: &mut Self::Color); fn lookup(&self, index: usize) -> Option<Self::Color> { ... }
fn has_lookup(&self) -> bool { ... } }
Expand description

A color map

Associated Types

The color type on which the map operates on

Required methods

Returns the index of the closest match of color in the color map.

Maps color to the closest color in the color map.

Provided methods

Looks up color by index in the color map. If idx is out of range for the color map, or ColorMap doesn’t implement lookup None is returned.

Determine if this implementation of ColorMap overrides the default lookup.

Implementations on Foreign Types

Indicate NeuQuant implements lookup.

Implementors