Socket
Book a DemoInstallSign in
Socket

get-average-color

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-average-color

Get average color from image in browser environment

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

get-average-color

npm version JavaScript Style Guide

Get average color from image in browser environment

This package provides a function called getAverageColor, which returns in promise the YUV average color of the image, whose url (or base64) will be passed as a parameter.

Preview

Install

$ npm i -S get-average-color

Usage

import getAverageColor from 'get-average-color'
import image from './img/myCoolImage.jpg'

getAverageColor(image).then(rgb => console.log(rgb)) // { r: 66, g: 83, b: 25 }

Demo

Clone this repo, install all dependencies and then start the demo

$ git clone git@github.com:bashkos/get-average-color.git
$ cd get-average-color
$ npm install
$ npm start

License

MIT.

Keywords

image

FAQs

Package last updated on 29 Jun 2017

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