The main purpose of the RGB (Red Green Blue) color model is for the sensing, representation and display of images in electronic systems, such as televisions and computers
HSL (Hue Saturation Lightness) is an alternative color model, designed in the 1970s by computer graphics researchers to more closely align with the way human vision perceives color-making attributes
The task is to write a function/program that takes HSL as an input and outputs RGB.
You can pick your preferred representation for I/O, as long as its consistent between them.
For example, they can be an array/tuple with 3 elements or an object with 3 properties named
l, but I'll accept other clever variations, like receiving the hsl as an integer (losing precision) and outputting an rgb integer.
The input can be assumed to be safe in range and format, both of which you can decide. I strongly suggest either the ranges
0-1 0-1 0-1 or
0-360 0-100 0-100 for hsl, and
0-1 0-1 0-1 or
0-255 0-255 0-255 for rgb.
Each answer is required to specify both of the above, and do put various variations in your answers if you're particularly proud of them, even if they don't have less characters than your other variations. Put the smallest on top.
Pseudo test cases for
0-360 0-100 0-100 →
0-255 0-255 0-255
h s l → r g b 0 0 0 → 0 0 0 90 56 17 → 43 68 19 202 19 39 → 81 104 118 72 55 26 → 88 103 30
The formulae for the conversion can be found here:
This as a nice way to visualize the conversion: