Trait exoquant::ColorSpace [] [src]

pub trait ColorSpace {
    fn to_linear(&self, color: Colorf) -> Colorf;
    fn from_linear(&self, color: Colorf) -> Colorf;

    fn to_dither(&self, c: Colorf) -> Colorf { ... }
    fn from_dither(&self, c: Colorf) -> Colorf { ... }
    fn to_float(&self, c: Color) -> Colorf { ... }
    fn from_float(&self, c: Colorf) -> Color { ... }
}

Defines the colorspaces in which to do quantization and remapping

The current implementation is subject to change. Just use SimpleColorSpace::default() for now wherever a ColorSpace parameter is required..

Required Methods

fn to_linear(&self, color: Colorf) -> Colorf

fn from_linear(&self, color: Colorf) -> Colorf

Provided Methods

fn to_dither(&self, c: Colorf) -> Colorf

fn from_dither(&self, c: Colorf) -> Colorf

fn to_float(&self, c: Color) -> Colorf

fn from_float(&self, c: Colorf) -> Color

Implementors