extract Saturation from color - Android Graphics

Android examples for Graphics:Color

Description

extract Saturation from color

Demo Code


//package com.java2s;

import android.graphics.Color;

public class Main {
    public static float extractSaturation(int colorInt) {
        float[] hsv = new float[3];
        Color.colorToHSV(colorInt, hsv);
        return hsv[1];
    }/*  ww  w .j a v a2 s  .  c o  m*/
}

Related Tutorials