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
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
- color-microservice – Get color information from any URL image microservice.
- colorable-dominant – Create ARIA-compliant color themes based on a predominant color palette.
License
MIT © Kiko Beats.