title: Android getColor inconsistency
body: <p>I need to send a color code to the backend server (forwarded to an iOS client) but <code>ContextCompact.getColor(context, colorResourceId);</code> returns a negative value which is unrecognizable by other clients (iOS).</p>
  
  <p>This is the resource HEX value:</p>
  
  <pre><code>&lt;color name="green"&gt;#1FAB06&lt;/color&gt;
  </code></pre>
  
  <p>This code below gives me the following negative integer value: <code>-14701818</code></p>
  
  <pre><code>int color = ContextCompat.getColor(context, mResourceColor);
  </code></pre>
  
  <p>This negative value converted in hex is:</p>
  
  <pre><code>1FAB06
  </code></pre>
  
  <p>If I convert this hex value to decimal back, I'm getting: <code>2075398</code></p>
  
  <pre><code>public int getColorDecimal(Context context) {
     int color = ContextCompat.getColor(context, mResourceColor);
     String hexColor = String.format("%06X", (0xFFFFFF &amp; color));
     color = Integer.parseInt(hexColor, 16);
  
     return color;
  }
  </code></pre>
  
  <p>The problem appears if I apply this positive decimal to the View. Android does not recognize this value. The edit-text remains white.</p>
  
  <pre><code>mETName.setTextColor(getColorDecimal(context));
  </code></pre>
  
  <p>The client and the web-service should have the same value (somehow) because of the data synchronization.</p>