A library for calculating the average color of an image.
npm install avg-color
For use in a web application:
import { avc } from 'avg-color';
const imagePath = 'path/to/your/image.jpg';
avc(imagePath)
.then((color) => {
console.log('Average color:', color);
})
.catch((error) => {
console.error('Error:', error);
});
This project is licensed under the MIT License. Details can be found in the LICENSE file.