Skip to content

Expose node-vibrant image analysis results via JSON API

Notifications You must be signed in to change notification settings

ClouDesire/vivace

This branch is up to date with master.

Folders and files

NameName
Last commit message
Last commit date
Aug 5, 2024
Mar 10, 2017
Mar 10, 2017
Feb 23, 2017
Feb 28, 2017
Feb 23, 2017
Feb 24, 2017
Mar 2, 2017
Mar 2, 2017
Feb 24, 2017
Feb 24, 2017
Mar 2, 2017

Repository files navigation

vivace CircleCI Docker Pulls Docker Stars

Extract prominent colors from an image

It exposes node-vibrant image analysis results via JSON API.

Build

Build with docker

$ docker build -t cloudesire/vivace .

Install

Install with docker

$ docker run -p 8080:3000 -d cloudesire/vivace

webservice is now listening on port 8080.

Usage

curl http://localhost:8080/?imgUrl=https://pbs.twimg.com/profile_images/616283184104390656/mFS3zZrF.jpg
{
	"Vibrant": {
		"rgb": [240, 151, 20],
		"population": 235,
		"hsl": [0.09924242424242423, 0.88, 0.26]
	},
	"Muted": null,
	"DarkVibrant": {
		"rgb": [124.644, 77.43839999999999, 7.956000000000001],
		"population": 0
	},
	"DarkMuted": null,
	"LightVibrant": {
		"rgb": [107, 194, 227],
		"population": 148,
		"hsl": [0.5458333333333333, 0.6818181818181818, 0.6549019607843137]
	},
	"LightMuted": {
		"rgb": [232, 220, 202],
		"population": 12,
		"hsl": [0.10000000000000009, 0.39473684210526305, 0.8509803921568627]
	}
}

A value of null means that such particular color can't be extracted from the image.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue