Simple image color extractor written in Rust with no external dependencies

Status:

Build Status

Demo:

http://dominant-color-demo.herokuapp.com/

Usage: ```rust use std::path;

fn main() { let image = image::open(&path::Path::new("./docs/Fotolia45549559320480.jpg")).unwrap(); let hasalpha = match image.color() { image::ColorType::Rgba8 => true, image::ColorType::Bgra8 => true, _ => false, }; let colors = dominantcolor::getcolors(&image.tobytes(), hasalpha); println!("hasalpha: {}, colors: {:?}", hasalpha, colors); } ```

Example image:

Image

Extracted colors:

Colors