Skip to main content

with_colors

Function with_colors 

Source
pub fn with_colors(colors: &[Color]) -> Option
Expand description

WithColors sets the colors to use to fill the progress bar. Depending on the number of colors passed in, will determine whether to use a solid fill or a blend of colors.

  • 0 colors: clears all previously set colors, setting them back to defaults.
  • 1 color: uses a solid fill with the given color.
  • 2+ colors: uses a blend of the provided colors.