Skip to main content

gradient_horizontal

Function gradient_horizontal 

Source
pub fn gradient_horizontal(width: u16, stops: &[(Color, f32)]) -> Vec<Color>
Expand description

Pre-compute a horizontal row of gradient colors.

Returns one Color per cell for the given width. Useful for caching per-cell border or progress-bar colors across consecutive renders.