Android Random Color Create getRamdonColor()

Here you can find the source of getRamdonColor()

Description

get Ramdon Color

Declaration

public static int getRamdonColor() 

Method Source Code

//package com.java2s;
import java.util.Random;

public class Main {
    public static int getRamdonColor() {
        Random random = new Random(System.currentTimeMillis());
        final int r = random.nextInt() % 255;
        final int g = random.nextInt() % 255;
        final int b = random.nextInt() % 255;
        int color = (r << 16) | (g << 8) | b;
        return color;
    }//  w w  w. j av a  2s .  c  om
}