A little utility that finds the dominant colour of an image and returns it as an RGB array.
huey is a little utility that finds the dominant colour of an image and returns it as an RGB array. It now works on the server as well as in the browser, and there’s also a command-line version.
$ npm install [-g] huey
huey'./image.jpg'var red = rgb0var green = rgb1var blue = rgb2// In case you want to do something// with the raw image data.console.logimagedataimageheightimagewidth
$ huey /path/to/image=> r, g, b
huey depends on get-image-data, which in turn depends on node-canvas. Although node-canvas is a great project, its dependencies can make it hard to install. If you run into problems, I recommend checking out their install guides on the node-canvas wiki.