Trait palette::Hue

source ·
pub trait Hue: GetHue {
    // Required methods
    fn with_hue<H: Into<Self::Hue>>(&self, hue: H) -> Self;
    fn shift_hue<H: Into<Self::Hue>>(&self, amount: H) -> Self;
}
Expand description

A trait for colors where the hue can be manipulated without conversion.

Required Methods§

source

fn with_hue<H: Into<Self::Hue>>(&self, hue: H) -> Self

Return a new copy of self, but with a specific hue.

source

fn shift_hue<H: Into<Self::Hue>>(&self, amount: H) -> Self

Return a new copy of self, but with the hue shifted by amount.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C: Hue, T: Clone> Hue for Alpha<C, T>

source§

impl<S, T> Hue for Hsl<S, T>
where T: Component + Float, S: RgbSpace,

source§

impl<S, T> Hue for Hsv<S, T>
where T: Component + Float, S: RgbSpace,

source§

impl<S, T> Hue for Hwb<S, T>
where T: Component + Float, S: RgbSpace,

source§

impl<Wp, T> Hue for Lch<Wp, T>
where T: Component + Float, Wp: WhitePoint,