pub trait ColorGradient {
    // Required method
    fn get_color(&self, position: f32) -> RGBA;
}

Required Methods§

source

fn get_color(&self, position: f32) -> RGBA

Get the color at the given position.

Arguments
  • position - The position of the color in the gradient.
Returns

The color at the given position.

Implementors§