dominant_color 0.1.2

Simple image color extractor written in Rust with no external dependencies
Documentation

Simple image color extractor written in Rust with no external dependencies

It's a Rust port of https://github.com/marekm4/color-extractor but only RGB palettes are supported for now!

Status:

Build Status

Demo:

https://color-extractor-demo.herokuapp.com/

Usage:

extern crate dominant_color;
extern crate image;

use std::path;

fn main() {
    let image = image::open(&path::Path::new("docs/Fotolia_45549559_320_480.jpg")).unwrap();
    let colors = dominant_color::get_colors(&image.raw_pixels());
    println!("{:?}", colors);
}

Example image:

Image

Extracted colors:

Colors