Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Color; public class Main { public static int argb(int color, float a) { int alpha = Math.round((a * 255)); int red = Color.red(color); int green = Color.green(color); int blue = Color.blue(color); return Color.argb(alpha, red, green, blue); } }