Trait bevy::color::ColorRange

pub trait ColorRange<T>
where T: Mix,
{ // Required method fn at(&self, factor: f32) -> T; }
Expand description

Represents a range of colors that can be linearly interpolated, defined by a start and end point which must be in the same color space. It works for any color type that implements Mix.

This is useful for defining gradients or animated color transitions.

Required Methods§

fn at(&self, factor: f32) -> T

Get the color value at the given interpolation factor, which should be between 0.0 (start) and 1.0 (end).

Implementations on Foreign Types§

§

impl<T> ColorRange<T> for Range<T>
where T: Mix,

§

fn at(&self, factor: f32) -> T

Implementors§