avg-color
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Avg Color

A library for calculating the average color of an image.

Installation

npm install avg-color

Usage

Web Usage

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);
  });

License

This project is licensed under the MIT License. Details can be found in the LICENSE file.

Package Sidebar

Install

npm i avg-color

Weekly Downloads

7

Version

1.0.2

License

MIT

Unpacked Size

31.1 kB

Total Files

45

Last publish

Collaborators

  • dotikdeveloper