color-thief-rs

color-thief-rs is a color-thief algorithm reimplementation in Rust.

The implementation itself is a heavily modified Swift version of the same algorithm.

Differences

Performance

About 150x faster that JS version.

text test q1 ... bench: 1,429,800 ns/iter (+/- 21,987) test q10 ... bench: 854,297 ns/iter (+/- 25,468)

Usage

Dependency: Rust >= 1.13

Add this to your Cargo.toml:

toml [dependencies] color-thief = "0.2"

License

color-thief-rs is licensed under the MIT.