Trait palette::ShiftHue

source ·
pub trait ShiftHue {
    type Scalar;

    // Required method
    fn shift_hue(self, amount: Self::Scalar) -> Self;
}
Expand description

Operator for increasing or decreasing the hue by an amount.

See also ShiftHueAssign, WithHue, SetHue and GetHue.

use palette::{Hsl, ShiftHue};

let green = Hsl::new_srgb(120.0, 1.0, 0.5);
let blue = green.shift_hue(120.0);
assert_eq!(blue, Hsl::new_srgb(240.0, 1.0, 0.5));

Required Associated Types§

source

type Scalar

The type of the hue modifier.

Required Methods§

source

fn shift_hue(self, amount: Self::Scalar) -> Self

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C, T> ShiftHue for Alpha<C, T>
where C: ShiftHue,

source§

impl<S, T> ShiftHue for Hsl<S, T>
where T: Add<Output = T>,

source§

impl<S, T> ShiftHue for Hsv<S, T>
where T: Add<Output = T>,

source§

impl<S, T> ShiftHue for Hwb<S, T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Cam16Jch<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Cam16Jmh<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Cam16Jsh<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Cam16Qch<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Cam16Qmh<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Cam16Qsh<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Cam16UcsJmh<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Okhsl<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Okhsv<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Okhwb<T>
where T: Add<Output = T>,

source§

impl<T> ShiftHue for Oklch<T>
where T: Add<Output = T>,

source§

impl<Wp, T> ShiftHue for Hsluv<Wp, T>
where T: Add<Output = T>,

source§

impl<Wp, T> ShiftHue for Lch<Wp, T>
where T: Add<Output = T>,

source§

impl<Wp, T> ShiftHue for Lchuv<Wp, T>
where T: Add<Output = T>,