Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-vibrant

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-vibrant

Node.js port of vibrant.js. Get color variations from an image. Basically a JS port of Android's Palette

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
40K
decreased by-51.97%
Maintainers
1
Weekly downloads
 
Created
Source

node-vibrant

Extract prominent colors from an image.

node-vibrant is a node.js port of Vibrant.js, which is a javascript port of the awesome Palette class in the Android support library.

Install

$ npm install node-vibrant

Usage

Vibrant = require('node-vibrant')

v = new Vibrant('path/to/image', opts)
v.getSwatches (err, swatches) ->
  console.log(swatches)

References

Vibrant.constructor(imagePath, opts)

NameTypeDescription
imagePathstringPath to image file
optsobjectOptions (optional)
opts
FieldDefaultDescription
colorCount64amount of colors in initial palette from which the swatches will be generated
quality50 is highest, but takes way more processing

Vibrant.getSwatches(cb)

NameTypeDescription
cbfunctioncallback function
cb(err, swatches)
NameTypeDescription
errobjectError (if thrown)
swatchesobjectResulting swatches

Keywords

FAQs

Package last updated on 04 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc