Trait color::Color[][src]

pub trait Color<T>: Copy {
    fn clamp_s(self, lo: T, hi: T) -> Self;
fn clamp_c(self, lo: Self, hi: Self) -> Self;
fn inverse(self) -> Self;
fn mix(self, other: Self, value: T) -> Self; }

Required methods

fn clamp_s(self, lo: T, hi: T) -> Self[src]

fn clamp_c(self, lo: Self, hi: Self) -> Self[src]

fn inverse(self) -> Self[src]

fn mix(self, other: Self, value: T) -> Self[src]

Loading content...

Implementors

impl<T: Channel + NumCast + Num, S: TransferFunction> Color<T> for Hsv<T, S>[src]

fn clamp_s(self, lo: T, hi: T) -> Hsv<T, S>[src]

Clamps the components of the color to the range (lo,hi).

fn clamp_c(self, lo: Hsv<T, S>, hi: Hsv<T, S>) -> Hsv<T, S>[src]

Clamps the components of the color component-wise between lo and hi.

fn inverse(self) -> Hsv<T, S>[src]

Inverts the color.

impl<T: Channel, C: Color<T>> Color<T> for AlphaColor<T, C>[src]

fn clamp_s(self, lo: T, hi: T) -> AlphaColor<T, C>[src]

Clamps the components of the color to the range (lo,hi).

fn clamp_c(self, lo: AlphaColor<T, C>, hi: AlphaColor<T, C>) -> AlphaColor<T, C>[src]

Clamps the components of the color component-wise between lo and hi.

fn inverse(self) -> AlphaColor<T, C>[src]

Inverts the color.

impl<T: Channel, S> Color<T> for Luma<T, S>[src]

fn clamp_s(self, lo: T, hi: T) -> Luma<T, S>[src]

Clamps the components of the color to the range (lo,hi).

fn clamp_c(self, lo: Luma<T, S>, hi: Luma<T, S>) -> Luma<T, S>[src]

Clamps the components of the color component-wise between lo and hi.

fn inverse(self) -> Luma<T, S>[src]

Inverts the color.

impl<T: Channel, S> Color<T> for Rgb<T, S>[src]

fn clamp_s(self, lo: T, hi: T) -> Rgb<T, S>[src]

Clamps the components of the color to the range (lo,hi).

fn clamp_c(self, lo: Rgb<T, S>, hi: Rgb<T, S>) -> Rgb<T, S>[src]

Clamps the components of the color component-wise between lo and hi.

fn inverse(self) -> Rgb<T, S>[src]

Inverts the color.

Loading content...