Function image_colors::print_colors
[−]
[src]
pub fn print_colors(
colors: ColorCounts,
with_ansi_color: bool,
delimiter: &str,
with_rgb: bool
)
Prints colors from ColorCounts
vector, options to use color, a delimiter, or print in rgb, not
hex.
Arguments
- 'colors' - A
ColorCounts
vector of colors to pixel count - '
with_ansi_color
' - Print with color? - 'delimiter' - Delimiter to be used when printing
ColorCounts
- '
with_rgb
' - Print in rgb
Example
let _colors = image_colors::fetch_colors(&Path::new("path/to/file.jpg"), 5); let sorted_colors = image_colors::sort_colors(&_colors, 5); image_colors::print_colors(sorted_colors, false, " - ", false);