title: Convert hex color value ( #ffffff ) to integer value
body: <p>I am receiving hex color values from a server (in this form, <code>#xxxxxx</code> , example <code>#000000</code> for black)</p>
  
  <p>How do I convert this to an integer value? </p>
  
  <p>I tried doing <code>Integer.valueOf("0x" + passedColor.substring(1, passedColor.length()))</code> to get an even more hextastic <code>0x000000</code> result, but this isn't intepreted as an <code>int</code> here, any other suggestions?</p>
  
  <p>I receive an error: <code>08-03 21:06:24.673: ERROR/AndroidRuntime(20231): java.lang.NumberFormatException: unable to parse '0x00C8FBFE' as integer</code></p>
  
  <p>I am using the Android SDK for their <code>setBackgroundColor(int color)</code> function, which takes - as you might have guessed - an integer color value.</p>
  
  <p>This is the OPPOSITE of this question: <a href="https://stackoverflow.com/questions/6539879/how-to-convert-a-color-integer-to-a-hex-string-in-android">How to convert a color integer to a hex String in Android?</a></p>