How HSL to RGB Converter works
This converter changes HSL values into RGB values entirely in your browser. The starting fields are validated before any calculation runs, so incomplete values and channels outside their defined ranges do not silently produce a plausible-looking answer. The initial example is hsl(192°, 91%, 36%) becomes rgb(8, 144, 175) after inverse rounding. Change one field and the output is recomputed immediately; the copy button uses the same displayed, rounded result.
The calculation is: C = (1 − |2L − 1|)S; X = C(1 − |(H/60 mod 2) − 1|); add m = L − C/2, then scale channels by 255. Channel percentages are converted to fractions before multiplication, while RGB channels are normalized by dividing by 255 when the formula requires a zero-to-one range. Whole-number display values use standard Math.round behavior.
Conversion can lose precision when a format uses rounded integers. For example, an RGB color converted to whole-number HSL or CMYK and then converted back may differ by one or more RGB channel units. That is expected quantization, not a random result. Keep the original HEX or RGB value when byte-for-byte round trips matter, and treat rounded HSL or CMYK as a practical representation of that source.
The forward HEX, RGB, HSL, and CMYK routines reuse the exact formulas and rounding rules from the working WowLayers Color Lab picker. The inverse RGB calculation uses the standard formula printed above because the original picker only converts outward from HEX. No library, network request, or hidden lookup table participates in the live result.