0.0.6 • Published 7 years ago

get-average-color v0.0.6

Weekly downloads
270
License
MIT
Repository
github
Last release
7 years ago

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.

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago