title: PHP function to convert HSL to RGB or Hex
body: <p>Does anyone know a PHP function (for >5.3) which can convert an HSL color to either RGB or Hex? I've tried a dozen Google searches and none of the functions I have found work as expected.</p>
  
  <p>It doesn't matter whether the function converts to RGB or hex because converting between those two is trivial. The inputs are HSL values for CSS (Hue: 0–360, Saturation: 0–100, Lightness: 0–100).</p>
  
  <p>Edit: Specifying the input and output format would be a bonus :)</p>