random Bright Color - Java 2D Graphics

Java examples for 2D Graphics:Color

Description

random Bright Color

Demo Code


//package com.java2s;
import java.awt.*;

public class Main {
    public static Color randBrightColor() {
        return new Color((float) Math.random() / 2 + .5f,
                (float) Math.random() / 2 + .5f,
                (float) Math.random() / 2 + .5f);
    }/* ww  w . j  av  a 2s .c  o m*/
}

Related Tutorials