Function toSRgb
Converts HSL to encoded sRGB without clipping or gamut mapping.
Example
const red = SRgbd(1.0, 0.0, 0.0) .toHsl;
assert(red .h == 0.0);
assert(red .s == 1.0);
assert(red .l == 0.5);
const gray = SRgbd(0.4, 0.4, 0.4) .toHsl;
assert(gray .h == 0.0);
assert(gray .s == 0.0);
assert(gray .l == 0.4);
Example
const color = Hsld(360.0 + 120.0, 1.0, 0.5) .toSRgb;
assert(color .r == 0.0);
assert(color .g == 1.0);
assert(color .b == 0.0);