Java tutorial
//package com.java2s; import android.graphics.*; public class Main { public static int getColor(int index) { int colors[] = new int[] { Color.rgb(69, 228, 106), Color.rgb(228, 96, 69), Color.rgb(80, 125, 209), Color.rgb(230, 249, 88) }; return colors[index]; } }