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

x/chalkpot_color/mod.ts>discolor

Color is a tool for creating RGB color by range and by HSL without leaving RGB space.
Go to Latest
function discolor
import { discolor } from "https://deno.land/x/chalkpot_color@1.1.0/mod.ts";

Example

const red = new Color(false, 255, 0, 0);
const white = new Color(false, 255, 255, 255);

const grey = discolor(red);
console.log(grey.components); // [85, 85, 85]

const _white = discolor(white);
console.log(_white.components); // [255, 255, 255]

Parameters

color: Color

Returns

Color