Skip to main content
Module

x/imagescript/mod.ts>Image#dominantColor

zero-dependency JavaScript image manipulation
Extremely Popular
Go to Latest
method Image.prototype.dominantColor
import { Image } from "https://deno.land/x/imagescript@1.2.15/mod.ts";

Gets the images dominant color

Parameters

optional
ignoreBlack = [UNSUPPORTED]

Whether to ignore dark colors below the threshold

optional
ignoreWhite = [UNSUPPORTED]

Whether to ignore light colors above the threshold

optional
bwThreshold = [UNSUPPORTED]

The black/white threshold (0-64)