Trait cosmic::cosmic_theme::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§
Required Methods§
Object Safety§
This trait is not object safe.