Skip to content

rgbToHsl

Function: rgbToHsl()

function rgbToHsl(
r,
g,
b): Vec3

Given values for an RGB color convert to and return a valid HSL value

Parameters

r

number

Red value in RGB

g

number

Green value in RGB

b

number

Blue value in RGB

Returns

Vec3

an array in the order of hue, saturation, light numerical values

Defined in

converter.ts:45