import { AdvancedColor } from "https://deno.land/x/chalkpot_color@3.1.0/mod.ts";
AdvancedColor is an advanced RGB color.
Like regular Color
, it mimics the HSL model.
Example
const darkGreen = new AdvancedColor(33.33, undefined, 25);
console.log(darkGreen.components); // [0, 127.8, 0]
const paleRed = new AdvancedColor(100, 70, 80);
console.log(paleRed.components); // [255, 173.3, 173.3]
Hue. Percentage value of the color wheel from 0 to 100:
- Red: 0;
- Green: 33.33;
- Blue: 66.66;
- Red: 100;
Saturation. Percentage value from 0 to 100:
- Colorless (grey color): 0;
- Hue color: 100;
Lightness. Percentage value from 0 to 100:
- Black: 0;
- Hue color: 50;
- White: 100;