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

x/chalkpot_color/color_effects/mod.ts>discolor

Color is a tool for creating RGB color by range and by HSL without leaving RGB space.
Latest
function discolor
import { discolor } from "https://deno.land/x/chalkpot_color@3.1.0/color_effects/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