Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Color; public class Main { public static int rgbToColor(int[] rgb) { assert (rgb.length == 3); return Color.rgb(rgb[0], rgb[1], rgb[2]); } public static int rgbToColor(int R, int G, int B) { return Color.rgb(R, G, B); } }