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 lighterColor(int color, int lighter) {
        int r = Math.max(Math.min(Color.red(color) + lighter, 255), 0);
        int g = Math.max(Math.min(Color.green(color) + lighter, 255), 0);
        int b = Math.max(Math.min(Color.blue(color) + lighter, 255), 0);
        return Color.rgb(r, g, b);
    }
}