Skip to main content
Module

x/monke/mod.ts>ColorHistogram

Color quantization and dithering in TypeScript.
Go to Latest
class ColorHistogram
import { ColorHistogram } from "https://deno.land/x/monke@v1.0.0/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

Static Methods

getColor(index: number): Color