is Dark Color - Android Graphics

Android examples for Graphics:Color Darken

Description

is Dark Color

Demo Code


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

public class Main {
    public static boolean isDark(int color) {
        int valuedColor = Color.red(color) * 299 + Color.green(color) * 587
                + Color.blue(color) * 114;

        return valuedColor < 186000;
    }//from www.  ja v  a  2  s .co  m
}

Related Tutorials