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

x/chalkpot_random_colors/random_color.ts>randomColor

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

Example

const someRedColor = randomColor({
  hue: [0, 10],
  saturation: [10, 80],
  lightness: [40, 100],
});

console.log(someRedColor); // [255, 243.84..., 145.08...]

Parameters

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