[][src]Trait amethyst_rendy::palette::Limited

pub trait Limited {
    fn is_valid(&self) -> bool;
fn clamp(&self) -> Self;
fn clamp_self(&mut self); }

A trait for clamping and checking if colors are within their ranges.

Required methods

fn is_valid(&self) -> bool

Check if the color's components are within the expected ranges.

fn clamp(&self) -> Self

Return a new color where the components has been clamped to the nearest valid values.

fn clamp_self(&mut self)

Clamp the color's components to the nearest valid values.

Loading content...

Implementors

impl<C, T> Limited for Alpha<C, T> where
    C: Limited,
    T: Component
[src]

impl<S, T> Limited for Luma<S, T> where
    S: LumaStandard,
    T: Component
[src]

impl<S, T> Limited for Rgb<S, T> where
    S: RgbStandard,
    T: Component
[src]

impl<S, T> Limited for Hsl<S, T> where
    S: RgbSpace,
    T: Component + Float
[src]

impl<S, T> Limited for Hsv<S, T> where
    S: RgbSpace,
    T: Component + Float
[src]

impl<S, T> Limited for Hwb<S, T> where
    S: RgbSpace,
    T: Component + Float
[src]

impl<Wp, T> Limited for Lab<Wp, T> where
    T: Component + Float,
    Wp: WhitePoint
[src]

impl<Wp, T> Limited for Lch<Wp, T> where
    T: Component + Float,
    Wp: WhitePoint
[src]

impl<Wp, T> Limited for Xyz<Wp, T> where
    T: Component + Float,
    Wp: WhitePoint
[src]

impl<Wp, T> Limited for Yxy<Wp, T> where
    T: Component + Float,
    Wp: WhitePoint
[src]

Loading content...