L. Kvri
L. Kvri

Reputation: 1723

Android Brightnes of Color programarically

How can I modify the brightness of Color programatically? for example with Java AWT Color convert to HSB modify brightness and convert to Color. In Android how can I do this?

Upvotes: 1

Views: 839

Answers (1)

Dan S
Dan S

Reputation: 9189

The API provides several methods to convert ARGB and HSV in the Color class.

Added Code snippet:

float []hsvBlue = new float[3];
Color.colorToHSV(Color.BLUE, hsvBlue);
int rgbBlue = Color.HSVToColor(hsvBlue);

Upvotes: 2

Related Questions