hslfunction
A colour as a CSS string, lightened or darkened by shift percentage points, at an opacity.
Import it
import { hsl } from "@johnmorrisdotca/tsunagi/draw";
Definition
function hsl([hue, saturation, lightness]: TsunagiColour, shift?: number, alpha?: number): string
Parameters
| Name | Type | Description |
|---|---|---|
options | TsunagiColour | Native drawing, geometry, game or mount settings. |
shift (optional) | number | The lightness adjustment. |
alpha (optional) | number | The opacity used in the CSS colour. |
Returns
string
A colour as a CSS string, lightened or darkened by shift percentage points, at an opacity.
Examples
import { hsl } from "@johnmorrisdotca/tsunagi/draw";
console.log(hsl([120,50,40]));hsl(120, 50%, 40%)What it prints (run when this page was built)