sempdf
sempdf v1.9.1Functions

Function: hsl()

sempdf v1.9.1


sempdf / hsl

function hsl(
   h, 
   s, 
   l): RgbColor;

Defined in: src/types.ts:3879

Creates a color from HSL. Converted to an RgbColor for output (HSL is not a native PDF color space).

Parameters

ParameterTypeDescription
hnumberHue in degrees; wrapped into [0, 360).
sstring | numberSaturation as a 0–1 fraction, a percentage string ("87%"), or a 0–100 number.
lstring | numberLightness as a 0–1 fraction, a percentage string ("80%"), or a 0–100 number.

Returns

RgbColor

The equivalent RGB color.

On this page