Skip to main content
Module

x/colors/mod.ts>quantizeByPopularity

Color conversion and stuff in TypeScript
Go to Latest
function quantizeByPopularity
import { quantizeByPopularity } from "https://deno.land/x/colors@v1.2.0/mod.ts";

Get a a reduced palette of just popular colors from the given palette.

Parameters

palette: Color[]

An array of colors to extract palette from

extractCount: number

Number of colors to extract

Returns

Color[]