Android examples for Graphics:Color Value
generate Random Color by masking int value
//package com.java2s; import android.graphics.Color; public class Main { public static int generateRandomColor() { int randomColor = Color.argb(0xFF, getRandomNum(), getRandomNum(), getRandomNum());/*from w w w . j a v a2 s . c o m*/ return randomColor; } private static int getRandomNum() { return (int) (Math.random() * 0xFF); } }