extract Hue from color - Android Graphics

Android examples for Graphics:Color Hue

Description

extract Hue from color

Demo Code


//package com.java2s;

import android.graphics.Color;

public class Main {
    public static float extractHue(int colorInt) {
        float[] hsv = new float[3];
        Color.colorToHSV(colorInt, hsv);
        return hsv[0];
    }//from   w  ww .  ja  v  a2 s  . c o  m
}

Related Tutorials