Trait palette::Clamp[][src]

pub trait Clamp {
    fn is_within_bounds(&self) -> bool;
fn clamp(&self) -> Self;
fn clamp_self(&mut self); }
Expand description

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

Required methods

Check if the color’s components are within the expected clamped range bounds.

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

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

Implementors