Android examples for Graphics:Color Value
Shifts the hue color value by the offset specified
//package com.java2s; import android.graphics.Color; public class Main { /**//from ww w . j a v a 2 s .c o m * Shifts the hue by the offset specified * @param color * @param offset * @return shifted color */ public static int shiftColorHue(int color, float offset) { float[] colorShiftHSV = new float[3]; Color.colorToHSV(color, colorShiftHSV); colorShiftHSV[0] = (colorShiftHSV[0] + offset) % 360; return Color.HSVToColor(colorShiftHSV); } }