New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

splashy

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

splashy

Given an image, extract predominant & palette colors

latest
Source
npmnpm
Version
6.0.23
Version published
Weekly downloads
269
-20.41%
Maintainers
1
Weekly downloads
 
Created
Source
microlink logo microlink logo

Last version Coverage Status NPM Status

Given an image, extract predominant & palette colors. 20+ image formats well tested.

Install

$ npm install splashy --save

Usage

From URL

;(async () => {
  const splashy = require('splashy')
  const got = require('got')

  const url = 'https://kikobeats.com/images/avatar.jpg'
  const { body } = await got(url, { responseType: 'buffer' })
  const palette = await splashy(body)

  console.log(palette)
  // => [ '#941c1c', '#841c16', '#aa695e', '#ca866c', '#6c5444', '#cca4a4' ]
})()

From Buffer

;(async () => {
  const splashy = require('splashy')
  const path = require('path')
  const fs = require('fs')

  const filepath = path.resolve(__dirname, 'avatar.jpg')
  const buffer = await fs.readFile(filepath)
  const palette = await splashy(buffer)

  console.log(palette)
  // => [ '#941c1c', '#841c16', '#aa695e', '#ca866c', '#6c5444', '#cca4a4' ]
})()

API

splashy(input)

input

Required
Type: ImageSource

The raw content for detecting the color information.

  • color-microservice – Get color information from any URL image microservice.
  • colorable-dominant – Create ARIA-compliant color themes based on a predominant color palette.

License

microlink-function © Microlink, released under the MIT License.

Authored and maintained by Kiko Beats with help from contributors.

Special thanks to Tim Carry for writing the benchmark and Lokesh Dhakar for the original code implementation.

microlink.io · GitHub microlinkhq · X @microlinkhq

Keywords

canvas

FAQs

Package last updated on 03 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts