Java Random Color getRandomColor()

Here you can find the source of getRandomColor()

Description

get Random Color

License

Open Source License

Declaration

public static Color getRandomColor() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import static java.lang.Math.random;
import java.awt.Color;

public class Main {
    public static Color getRandomColor() {
        return new Color((int) (random() * 255), (int) (random() * 255), (int) (random() * 255));
    }/*from ww  w.j av a2  s  .  c o m*/
}

Related

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