title: Generate cross browser CSS3 gradients in PHP
body: <p>As an input I have:</p>
  
  <ul>
  <li>two colors (be it in hex, rgb or rgba formats), as strings</li>
  <li>a number between 0 and 360 or an angle, in other words</li>
  </ul>
  
  <p>I have to generate a valid, crossbrowser, CSS3 gradients using those parameters. Like <a href="https://jsfiddle.net/nkqL6pu6/" rel="nofollow">this</a>.</p>
  
  <p>The part with colors is easy, the big pain is the part with converting angle value in a valid direction for every prefix.</p>
  
  <p>I've checked out <code>amazingSurge/jquery-asGradient</code> library already and it can do this sort of <a href="https://github.com/amazingSurge/jquery-asGradient/blob/master/test/gradient_test.js#L238" rel="nofollow">manipulations</a>. But doing CSS generation on client side is not a option for me.</p>
  
  <p>Is there some other PHP libraries that can deal with this?</p>