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

x/colors/src/util/histo.ts>ColorHistogram

Color conversion and stuff in TypeScript
Go to Latest
class ColorHistogram
import { ColorHistogram } from "https://deno.land/x/colors@v1.2.1/src/util/histo.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