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 getDarkerColor(int color) {
        int alpha = Color.alpha(color);
        int red = Math.round(Color.red(color) * 0.625f);
        int green = Math.round(Color.green(color) * 0.625f);
        int blue = Math.round(Color.blue(color) * 0.625f);
        return Color.argb(alpha, red, green, blue);
    }
}