create Disabled Color - Android Graphics

Android examples for Graphics:Color

Description

create Disabled Color

Demo Code


//package com.java2s;
import android.graphics.Color;

public class Main {
    public static int createDisabledColor(int color) {
        float[] hsv = new float[3];
        Color.colorToHSV(color, hsv);
        hsv[1] = 0.5f;//from   w ww .ja  va 2s .  com
        hsv[2] = 0.5f;
        return Color.HSVToColor(hsv);
    }
}

Related Tutorials