Module

x/color_hash/mod.ts>default#hsl

Generate color based on the given string (using HSL color space and SHA256).
Latest
method default.prototype.hsl
import { default } from "https://dotland.deno.dev/x/color_hash@v2.0.1/mod.ts";

Returns the hash in [h, s, l]. Note that H ∈ [0, 360); S ∈ [0, 1]; L ∈ [0, 1];

Parameters

str: string

string to hash

Returns

[number, number, number]

[h, s, l]