title: Cannot invoke getGreen() on the Primitive Type int
body: <p>So I'm continuing with my app to pick colors out of a picture taken by the user and returning the RGB values. The problem is that when I attempt to get the green value for the color, I get an error saying "cannot invoke getGreen() on the Primitive Type int". Here's the code I wrote:</p>
  
  <pre><code>Bitmap bitmap = ((BitmapDrawable)iv.getDrawable()).getBitmap(); 
  int touchedRGB = bitmap.getPixel(x,y);          
  rgbvals.setText("Color Value" + "#" + Integer.toHexString(touchedRGB));
  rgbvals.setTextColor(touchedRGB);
  int gval = touchedRGB.getgreen();
  </code></pre>
  
  <p>I also attempted to write the final line as</p>
  
  <pre><code>    String gval = Integer.toString(touchedRGB).getGreen();
  </code></pre>
  
  <p>But of course getGreen() can only be used on type int. Thanks in advance for the help guys!</p>