Here you can find the source of createGreenGradient()
public static int[] createGreenGradient()
//package com.java2s; //License from project: Open Source License public class Main { public static int[] createGreenGradient() { int[] colorArray = new int[5]; int alpha = 160; colorArray[0] = toARGB(alpha, 0, 95, 0); colorArray[1] = toARGB(alpha, 0, 95, 0); colorArray[2] = toARGB(alpha, 0, 110, 0); colorArray[3] = toARGB(alpha, 0, 115, 0); colorArray[4] = toARGB(alpha, 0, 120, 0); return colorArray; }// w ww. j ava2s . c om /** * @param alpha * [0..255] * @param red * [0..255] * @param green * [0..255] * @param blue * [0..255] * @return the calculated argb value */ public static int toARGB(int alpha, int red, int green, int blue) { return android.graphics.Color.argb(alpha, red, green, blue); } /** * @param colorString * #RRGGBB or #AARRGGBB or... read * {@link Color#parseColor(String)} * @return */ public static int toARGB(String colorString) { return android.graphics.Color.parseColor(colorString); } }