A library for extracting prominent colors from an image anywhere you can run JavaScript!
Warning: This library is still under construction! A pre-release version is available for testing only. Expect things to be broken. The below documentation is both incomplete and subject to change.
npm install --save @saeris/isomorphic-vibrant
# or
yarn add @saeris/isomorphic-vibrant
import { Vibrant } from "@saeris/isomorphic-vibrant"
const vibrant = new Vibrant(`url/to/image.png`, { colorCount: 64 })
console.log(await vibrant.getPalette())
This library was forked from node-vibrant.
Released under the MIT license.