JSPM

  • Created
  • Published
  • Downloads 1124
  • Score
    100M100P100Q88555F
  • License MIT

Given an image, extract predominant & palette colors

Package Exports

  • splashy

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (splashy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.

License

MIT © Kiko Beats.