Android examples for Graphics:Color Brighten
brighten color Relative to an offset
//package com.java2s; import android.graphics.Color; public class Main { public static int brightenRelative(int color, float brightnessOffset) { float[] hsv = new float[3]; Color.RGBToHSV(Color.red(color), Color.green(color), Color.blue(color), hsv); hsv[2] += brightnessOffset;//ww w .jav a 2 s. c o m if (hsv[2] > 1.0f) { hsv[2] = 1.0f; } else if (hsv[2] < 0.0f) { hsv[2] = 0.0f; } return Color.HSVToColor(Color.alpha(color), hsv); } }