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

x/chalkpot_color/mod.ts>invertColor

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

Example

const black = new Color(false, 0, 0, 0);

const white = invertColor(black);
console.log(white.components); // [255, 255, 255]