This version is a complete rewrite of the library, dropping GraphicsMagick for native Rust-based color extraction algorithm, bringing visually improved results and significantly faster processing.
Breaking changes
- NPM package is now published as
@colour-extractor/colour-extractor
, instead ofcolour-extractor
previously. topColours
(andtopColors
) take only one argument,path
to the image.topColours
now returns aPromise
, instead of taking a callback function.- Resolved promise no longer contains frequency at which each detected colour appears.
- Added
topColoursHex
which returns colors as CSS hex code, compared to an RGB triplet returned bytopColours
. rgb2hex
andhex2rgb
utility functions have been removed.