Android examples for Graphics:Color Operation
desaturation color by rate
//package com.java2s; import android.graphics.Color; public class Main { public static final int desaturation(int color, float rate) { float[] hsv = new float[3]; Color.colorToHSV(color, hsv); hsv[1] = hsv[1] * rate;//from www.ja v a 2 s . co m return Color.HSVToColor(hsv); } public static final int desaturation(int color) { return desaturation(color, 0.8f); } }