Closed ianschmitz closed 8 months ago
The logic for converting HSL to RGB appears to be flawed: https://github.com/jsdom/cssstyle/blob/b527ed722364dc6d156487c652df100572075dee/lib/utils/colorSpace.js#L13-L21
It refers to the W3 suggested logic for converting HSL to RGB, but their logic says that it expects the hue value to be normalized to a [0, 6) value which the logic in this package doesn't appear to do.
For example parsing:
hsl(85, 100%, 40%)
returns:
rgb(0, 0, 0)
The logic for converting HSL to RGB appears to be flawed: https://github.com/jsdom/cssstyle/blob/b527ed722364dc6d156487c652df100572075dee/lib/utils/colorSpace.js#L13-L21
It refers to the W3 suggested logic for converting HSL to RGB, but their logic says that it expects the hue value to be normalized to a [0, 6) value which the logic in this package doesn't appear to do.
For example parsing:
returns: