getHEXfromHSL()
function getHEXfromHSL(
h,
s,
l): HEX
Converts an HSL color to a hex color
Parameters
Parameter | Type | Description |
---|---|---|
h | number | The hue of the color |
s | number | The saturation of the color |
l | number | The lightness of the color |
Returns
The hex color
Example
const hex = getHEXfromHSL(0, 100, 50);
// Returns '#FF0000'