Given an image, extract predominant & palette colors.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.bumpedrc
.editorconfig
.gitattributes
.gitignore
.npmignore
.npmrc
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package.json

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.