Skip to content

Function: rgbToHsl() ​

ts
function rgbToHsl(__namedParameters): HslColor;

Converts an RgbColor object to an HslColor object.

Parameters ​

ParameterType
__namedParametersRgbColor

Returns ​

HslColor

Example ​

ts
rgbToHsl({ r: 255, g: 102, b: 0 }) // => { h: 24, s: 100, l: 50, a: 1 }

Since ​

1.0.0

Released under the MIT License.