Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Color; import java.util.Random; public class Main { private static Random randomGenerator = new Random(); /** * Returns a random color. * @return */ public static int getRandomColor() { return Color.rgb(randomGenerator.nextInt(255), randomGenerator.nextInt(255), randomGenerator.nextInt(255)); } }