Trait bevy_color::Hue

source ·
pub trait Hue: Sized {
    // Required methods
    fn with_hue(&self, hue: f32) -> Self;
    fn hue(&self) -> f32;
    fn set_hue(&mut self, hue: f32);

    // Provided method
    fn rotate_hue(&self, degrees: f32) -> Self { ... }
}
Expand description

Trait for manipulating the hue of a color.

Required Methods§

source

fn with_hue(&self, hue: f32) -> Self

Return a new version of this color with the hue channel set to the given value.

source

fn hue(&self) -> f32

Return the hue of this color [0.0, 360.0].

source

fn set_hue(&mut self, hue: f32)

Sets the hue of this color.

Provided Methods§

source

fn rotate_hue(&self, degrees: f32) -> Self

Return a new version of this color with the hue channel rotated by the given degrees.

Object Safety§

This trait is not object safe.

Implementors§