Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/imagescript/ImageScript.js>Image#dominantColor

zero-dependency JavaScript image manipulation
Extremely Popular
Latest
method Image.prototype.dominantColor
import { Image } from "https://deno.land/x/imagescript@1.3.0/ImageScript.js";

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)