Skip to content
VibrantVibrant

Vibrant

A Node.js and Browser compatible image color extraction library

  • Vibrant
  • Dark Vibrant
  • Light Vibrant
  • Muted
  • Dark Muted
  • Light Muted

Examples

  • Vibrant
  • Dark Vibrant
  • Light Vibrant
  • Muted
  • Dark Muted
  • Light Muted
  • Vibrant
  • Dark Vibrant
  • Light Vibrant
  • Muted
  • Dark Muted
  • Light Muted

Usage



Terminal window
npm i node-vibrant
// Node
import { Vibrant } from "node-vibrant/node";
// Browser
import { Vibrant } from "node-vibrant/browser";
// Web Worker
import { Vibrant } from "node-vibrant/worker";
// Using builder
Vibrant.from("path/to/image")
.getPalette()
.then((palette) => console.log(palette));
// Using constructor
let v = new Vibrant("path/to/image", opts);
v.getPalette().then((palette) => console.log(palette));