Android Colors edit

Color Manipulation

To manipulate colors we will modify the argb (Alpha, Red, Green and Blue) values of a color.

First extract RGB values from your color.

int yourColor = Color.parse("#ae1f67");

int red = Color.red(yourColor);
int green = Color.green(yourColor);
int blue = Color.blue(yourColor);

Now you can reduce or increase red, green, and blue values and combine them to be a color again:

int newColor = Color.rgb(red, green, blue);

Or if you want to add some alpha to it, you can add it while creating the color:

int newColor = Color.argb(alpha, red, green, blue);

Alpha and RGB values should be in the range [0-225].

Colors/
Colors
Color Manipulation

Table Of Contents
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close