Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/monke/mod.ts>ColorHistogram

Color quantization and dithering in TypeScript.
Latest
class ColorHistogram
import { ColorHistogram } from "https://deno.land/x/monke@v1.0.2/mod.ts";

Histogram of colors with reduced space Effectively quantizes the image into 32768 colors

Constructors

new
ColorHistogram()

Properties

readonly
length: number
readonly
raw: Uint32Array

Methods

add(color: Color, amount: number): number
get(color: Color): number
getQuantized(color: [number, number, number]): number