Given an image, extract predominant & palette colors.
Clone or download
Latest commit df9abc7 Sep 8, 2018
Permalink
Failed to load latest commit information.
test Update deps May 13, 2018
.bumpedrc First commit Aug 11, 2017
.editorconfig First commit Aug 11, 2017
.gitattributes First commit Aug 11, 2017
.gitignore First commit Aug 11, 2017
.npmignore First commit Aug 11, 2017
.npmrc First commit Aug 11, 2017
.travis.yml Avoid lts Oct 14, 2017
CHANGELOG.md Release 2.0.4 Sep 8, 2018
LICENSE First commit Aug 11, 2017
README.md Update badge url Nov 8, 2017
index.js Use tempy instad of create-temp-file2 Sep 8, 2018
package.json Release 2.0.4 Sep 8, 2018

README.md

splashy

Last version Build Status Coverage Status Dependency status Dev Dependencies Status NPM Status Donate

Given an image, extract predominant & palette colors.

Install

$ npm install splashy --save

Usage

const splashy = require('splashy')()

;(async () => {
  const colors = await splashy.fromUrl('https://i.imgur.com/ZJDyOhn.jpg')
  console.log(colors)
  // => [ '#941c1c', '#841c16', '#aa695e', '#ca866c', '#6c5444', '#cca4a4' ]
})()

API

splashy([options])

options

tempFileOpts

create-tempfile-file2 configuration related with temporal file location.

splashy.fromUrl(url)

url

Required
Type: String

The url of the image to extract the color information.

splashy.fromFile(filepath)

filepath

Required
Type: String

The filepath of the image to extract the color information.

Related

License

MIT © Kiko Beats.