Trait palette::Saturate
[−]
[src]
pub trait Saturate: Sized { fn saturate(&self, factor: f32) -> Self; fn desaturate(&self, factor: f32) -> Self { ... } }
A trait for colors where the saturation (or chroma) can be manipulated without conversion.
use palette::{Hsv, Saturate}; let a = Hsv::hsv(0.0.into(), 0.25, 1.0); let b = Hsv::hsv(0.0.into(), 1.0, 1.0); assert_eq!(a.saturate(1.0), b.desaturate(0.5));
Required Methods
Provided Methods
fn desaturate(&self, factor: f32) -> Self
Decrease the saturation by factor
.