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

x/chalkpot_color/mod.ts>subtractColors

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

Example

const purple = new Color(false, 128, 0, 128);
const blue = new Color(false, 0, 0, 128);

const red = subtractColors(purple, blue);
console.log(red.components); // [128, 0, 0]

Parameters

first: Color
second: Color