Skip to main content

progress_gradient

Function progress_gradient 

Source
pub fn progress_gradient(base_color: Color) -> Gradient
Expand description

Create a gradient suited for UI progress bars

Creates a smooth gradient from a dim color to a bright color. Useful for progress bars, level indicators, etc.

§Arguments

  • base_color - The base hue (will be dimmed for 0%)

§Returns

A gradient from dim(base_color, 0.3) to base_color