Reputation: 7405
I have the following:
mPaintRefernce.getColor()
How would I retrieve the RGB values in the range of 0-255, so Red = 200, Blue = 120 etc?
Upvotes: 0
Views: 1737
Reputation: 12809
That's possible, use the android.graphics.Color
class provided by android framework
Color.red(int color);
to get the red integer value from colorColor.green(int color);
to get the green integer value from colorColor.blue(int color);
to get the blue integer value from colorFor example, to get the red color.
int red = Color.red(mPaintRefernce.getColor());
Upvotes: 4