color-picture
v0.1.7
Published
average image color
Downloads
24
Maintainers
Readme
get average color by image
install
yarn add color-picture
// or
npm i --save color-picture
use
import { getAverageRGBA } from "color-picture";
const img = document.querySelector('img');
const backgr = getAverageRGBA(img);
document.body.style.backgroundColor = backgr;