title: Convert rgb strings to hex in Javascript
body: <p>I am using the TweenMax JS library with the ColorPropsPlugin which will tween color values which are specified in many formats, the problem I have is that the result is always in the form of a string:</p>
  
  <pre><code>"rgb(255,255,255)"
  </code></pre>
  
  <p>How can that be converted in to a hex number like:</p>
  
  <pre><code>0xffffff
  </code></pre>