Java Random Color getRandomRgb()

Here you can find the source of getRandomRgb()

Description

get Random Rgb

License

Open Source License

Declaration

private static int[] getRandomRgb() 

Method Source Code

//package com.java2s;

import java.util.Random;

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

    private static int[] getRandomRgb() {
        int[] rgb = new int[3];
        for (int i = 0; i < 3; i++) {
            rgb[i] = random.nextInt(255);
        }//from www  .ja  va 2 s . co m
        return rgb;
    }
}

Related

  1. getRandomColorInString()
  2. getRandomColour()
  3. getRandomHexColor()
  4. getRandomHexColor()
  5. getRandomIntColor()
  6. makeRandomColor()
  7. makeRandomColor()
  8. makeRandomColor(Color color)
  9. makeRandomColor(Color color, Color darkestColor, int maxAttempts)