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

x/chalkpot_random_colors/mod.ts>randomColors

Random colors are tools for generating attractive color, similar colors, color palettes or any random colors.
Latest
function randomColors
import { randomColors } from "https://deno.land/x/chalkpot_random_colors@1.0.0/mod.ts";

Example

const colors = randomColors({
  hue: [20, 60],
  saturation: [10, 80],
  lightness: [40, 100],
  count: 2
});

console.log(colors); // [[199.29..., 255, 255], [113.04..., 255, 183.30...]]

Parameters

optional
unnamed 0: { hue?: [number, number]; saturation?: [number, number]; lightness?: [number, number]; count?: number; } = [UNSUPPORTED]

Returns

Rgb[]