import { Color } from "https://deno.land/x/monke@v1.0.0/mod.ts";
General class for RGBA colors
Properties
Get the average of all colors
Can also be used instead of grayscale
using
const color = new Color(r, g, b, a);
const avg = color.average;
const grayscaleColor = new Color(avg, avg, avg, a);
Static Methods
fromCmyk(): Color
c: number,
m: number,
y: number,
k: number,
fromHex(hex: string): Color
fromHsl(): Color
h: number,
s: number,
l: number,
fromHsv(): Color
h: number,
s: number,
v: number,
fromLab(): Color
l: number,
a: number,
b: number,
fromRgba(): Color
r: number,
g: number,
b: number,
Redundant static method for conversion from sRGB color space
toHex(n: number): string