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§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.