fast-average-color
Version:
A simple library that calculates the average color of images, videos and canvas in browser environment.
6 lines (5 loc) • 641 B
TypeScript
import type { FastAverageColorIgnoredColor, FastAverageColorRgb, FastAverageColorRgba, FastAverageColorRgbaWithThreshold } from '../types';
export declare function arrayToHex(arr: number[]): string;
export declare function isDark(color: number[]): boolean;
export declare function prepareIgnoredColor(color?: FastAverageColorIgnoredColor): Array<FastAverageColorRgb | FastAverageColorRgba | FastAverageColorRgbaWithThreshold>;
export declare function isIgnoredColor(data: number[] | Uint8ClampedArray | Uint8Array, index: number, ignoredColor: Array<FastAverageColorRgb | FastAverageColorRgba | FastAverageColorRgbaWithThreshold>): boolean;