0.1.7 • Published 5 years ago
color-picture v0.1.7
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;