image-palette2

1.0.5 • Public • Published

Image-palette

API

var palette = require('image-palette2');
// image_path,color_number,callback
palette('./examples/cat.jpg', 5, function (colors) {
    console.log(colors);
});

Result:

[ { color: [ 132, 124, 70 ], ratio: 87.59066481265737 },
  { color: [ 195, 209, 180 ], ratio: 6.681114576939298 },
  { color: [ 179, 178, 175 ], ratio: 2.8457372401150822 },
  { color: [ 33, 30, 20 ], ratio: 2.348829343455222 },
  { color: [ 78, 48, 27 ], ratio: 0.5336540268330264 } ]

Installation

$ npm install image-palette2

Dependents (0)

Package Sidebar

Install

npm i image-palette2

Weekly Downloads

0

Version

1.0.5

License

none

Unpacked Size

19.7 kB

Total Files

5

Last publish

Collaborators

  • xvan-turing