Java Random Color getRandomColor()

Here you can find the source of getRandomColor()

Description

get Random Color

License

Artistic License

Declaration

private static Color getRandomColor() 

Method Source Code


//package com.java2s;
//License from project: Artistic License 

import java.awt.Color;

import java.util.Random;

public class Main {
    private static Random random = new Random();

    private static Color getRandomColor() {
        int red = random.nextInt(225);
        int green = random.nextInt(225);
        int blue = random.nextInt(225);
        return new Color(red, green, blue);
    }//from www  .j  a va  2s. c om
}

Related

  1. getRandomColor()
  2. GetRandomColor()
  3. getRandomColor()
  4. getRandomColor()
  5. getRandomColor()
  6. getRandomColor()
  7. getRandomColor()
  8. getRandomColor()
  9. getRandomColor()