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

x/chalkpot_random_colors/similar_color.ts>similarColor

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

Example

const someBlueColor = similarColor([0, 0, 255], { deviation: 20 });
console.log(someBlueColor); // [1.19..., 0, 255]

Parameters

color: Rgb

The source color from which a random similar color will be created.

optional
unnamed 1: { deviation?: number; } = [UNSUPPORTED]

A color deviation is an RGB component in the numeric range 0 to 255, the range that will be added to the original color range.