Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static int getBorW(int color) {
        int avg = ((Color.red(color) + Color.green(color) + Color.blue(color)) / 3);
        if (avg >= 100) {
            return Color.BLACK;
        } else {
            return Color.WHITE;
        }

    }
}