Overview of Fast Average Color
masterfast-average-color is a lightweight library designed to calculate the average or dominant color of images or videos in a browser environment. It is optimized for speed and supports various input types including images, videos, canvases, and raw pixel data.
Key Features
- High Performance: Optimized for speed.
- Multiple Algorithms: Supports
simple,sqrt(default), anddominantalgorithms. - Versatile Inputs: Works with
HTMLImageElement, video,HTMLCanvasElement,OffscreenCanvas,ImageBitmap,VideoFrame, and raw pixel arrays (Uint8Array,Uint8ClampedArray, or arrays of numbers). - Advanced Capabilities: Supports transparency (PNG, SVG), specific resource regions, and Web Workers.
- Small Footprint: Small bundle size and supports tree shaking.