pub fn rotate_hue(&self, val: Rational) -> Self {
        match self {
            Color::Rgba(rgba) => {
                let hsla = Hsla::from(rgba);
                Hsla::new(
                    hsla.hue() + val,
                    hsla.sat(),
                    hsla.lum(),
                    hsla.alpha(),
                )
                .into()
            }
            Color::Hsla(hsla) => Hsla::new(
                hsla.hue() + val,
                hsla.sat(),
                hsla.lum(),
                hsla.alpha(),
            )
            .into(),
            Color::Hwba(hwba) => Hwba::new(
                hwba.hue() + val,
                hwba.whiteness(),
                hwba.blackness(),
                hwba.alpha(),
            )
            .into(),
        }
    }
/// Rotate the hue of this color by a specific number of degrees.
Rotate the hue of this color by a specific number of degrees.
Rotate the hue of this color by a specific number of degrees .
pub fn rotate_hue(&self, val: Rational) -> Self {
        match self {
            Color::Rgba(rgba) => {
                let hsla = Hsla::from(rgba);
                Hsla::new(
                    hsla.hue() + val,
                    hsla.sat(),
                    hsla.lum(),
                    hsla.alpha(),
                )
                .into()
            }
            Color::Hsla(hsla) => Hsla::new(
                hsla.hue() + val,
                hsla.sat(),
                hsla.lum(),
                hsla.alpha(),
            )
            .into(),
            Color::Hwba(hwba) => Hwba::new(
                hwba.hue() + val,
                hwba.whiteness(),
                hwba.blackness(),
                hwba.alpha(),
            )
            .into(),
        }
    }
pub fn rotate_hue ( & self , val : Rational ) -> Self { match self { Color :: Rgba ( rgba ) => { let hsla = Hsla :: from ( rgba ) ; Hsla :: new ( hsla . hue ( ) + val , hsla . sat ( ) , hsla . lum ( ) , hsla . alpha ( ) , ) . into ( ) } Color :: Hsla ( hsla ) => Hsla :: new ( hsla . hue ( ) + val , hsla . sat ( ) , hsla . lum ( ) , hsla . alpha ( ) , ) . into ( ) , Color :: Hwba ( hwba ) => Hwba :: new ( hwba . hue ( ) + val , hwba . whiteness ( ) , hwba . blackness ( ) , hwba . alpha ( ) , ) . into ( ) , } }
Rotate the hue of this color by a specific number of degrees.
Rotate the hue of this color by a specific number of degrees .
&self
val
Rational
&self
val
Rational