Java tutorial
//package com.java2s; import android.graphics.Color; public class Main { public static int getRandomColor() { int red = (int) (Math.random() * 255); int green = (int) (Math.random() * 255); int blue = (int) (Math.random() * 255); return Color.rgb(red, green, blue); } }