title: Invert a hexadecimal color in Android
body: <p>How to invert a hexadecimal color in Android?
  I am trying to use ~ but this invert alpha also.</p>
  
  <pre><code> private PaintType getNegativePaintType(String hexa) {
      //hexa = "#28cb43"; 
      return new SolidColor(~Color.parseColor(hexa));
  }
  </code></pre>