extract Value from color - Android Graphics

Android examples for Graphics:Color Value

Description

extract Value from color

Demo Code


//package com.java2s;

import android.graphics.Color;

public class Main {
    public static float extractValue(int colorInt) {
        float[] hsv = new float[3];
        Color.colorToHSV(colorInt, hsv);
        return hsv[2];
    }//  w ww. j ava  2  s.  com
}

Related Tutorials