Skip to content

Function: rgbToHsv()

ts
function rgbToHsv(__namedParameters): HsvColor;

Converts an RgbColor object to an HsvColor object.

Parameters

ParameterType
__namedParametersRgbColor

Returns

HsvColor

Example

ts
rgbToHsv({ r: 255, g: 102, b: 0 }) // => { h: 24, s: 100, v: 100 }

Since

1.0.0

Released under the MIT License.