Java tutorial
//package com.java2s; import android.graphics.Color; import java.util.Random; public class Main { public static int generateColor() { Random random = new Random(); final float hue = random.nextInt(360); final float saturation = (random.nextInt(7000) + 2000) / 10000f; final float luminance = 0.3f; float[] hsv = { hue, saturation, luminance }; return Color.HSVToColor(hsv); } }