Skip to content

Function: toHslString() ​

ts
function toHslString(hsl): string;

Returns a CSS hsl(h, s%, l%) string from an HslColor object.

Parameters ​

ParameterType
hslHslColor

Returns ​

string

Example ​

ts
toHslString({ h: 24, s: 100, l: 50 }) // => 'hsl(24, 100%, 50%)'

Since ​

1.0.0

Released under the MIT License.