I am looking for a JavaScript / PHP algorithm to convert between HSL color to RGB.
It seems to me that HSL is not very widely used so I am not having much luck search
An hsl|a color value, set in javascript, will be instantly converted to rgb|a All you need to do then is access the computed style value
document.body.style.color = 'hsla(44, 100%, 50%, 0.8)';
console.log(window.getComputedStyle(document.body).color);
// displays: rgba(255, 187, 0, 0.8)
Technically, I guess, this isn't even any lines of code - it's just done automatically. So, depending on your environment, you might be able to get away with just this. Not that there aren't a lot of very thoughtful responses here. I don't know what your goal is.
Now, what if you want to convert from rbg|a to hsl|a?