Crates.io | color-thief |
lib.rs | color-thief |
version | 0.2.2 |
source | src |
created_at | 2017-08-01 13:46:50.00321 |
updated_at | 2022-06-04 13:56:16.171947 |
description | Grabs the dominant color or a representative color palette from an image. |
homepage | |
repository | https://github.com/RazrFalcon/color-thief-rs |
max_upload_size | |
id | 25981 |
size | 534,539 |
color-thief-rs is a color-thief algorithm reimplementation in Rust.
The implementation itself is a heavily modified Swift version of the same algorithm.
getColor
method, since it's just a shorthand for getPalette
.About 150x faster that JS version.
test q1 ... bench: 1,429,800 ns/iter (+/- 21,987)
test q10 ... bench: 854,297 ns/iter (+/- 25,468)
Dependency: Rust >= 1.13
Add this to your Cargo.toml
:
[dependencies]
color-thief = "0.2"
color-thief-rs is licensed under the MIT.