Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.graphics.Color;

public class Main {
    public static int colorToColor(int i, int j, float f) {
        int k = Color.alpha(i);
        int l = Color.red(i);
        int i1 = Color.green(i);
        int j1 = Color.blue(i);
        int k1 = Color.alpha(j);
        int l1 = Color.red(j);
        int i2 = Color.green(j);
        int j2 = Color.blue(j);
        return Color.argb((int) (f * (float) k1 + (float) k * (1.0F - f)),
                (int) (f * (float) l1 + (float) l * (1.0F - f)), (int) (f * (float) i2 + (float) i1 * (1.0F - f)),
                (int) (f * (float) j2 + (float) j1 * (1.0F - f)));
    }
}