bevy_color

Trait 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.

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.

Implementors§