Java Random Color getRandColor(int fc, int bc)

Here you can find the source of getRandColor(int fc, int bc)

Description

get Rand Color

License

Apache License

Declaration

public static Color getRandColor(int fc, int bc) 

Method Source Code


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

import java.awt.Color;

import java.util.Random;

public class Main {

    public static Color getRandColor(int fc, int bc) {
        Random random = new Random();

        int r = fc + random.nextInt(bc - fc);
        int g = fc + random.nextInt(bc - fc);
        int b = fc + random.nextInt(bc - fc);

        return new Color(r, g, b);
    }//from   www  .  j a va2 s .c  om
}

Related

  1. getRandColor(int fc, int bc)
  2. getRandColor(int fc, int bc)
  3. getRandom()
  4. getRandomColor()
  5. getRandomColor()
  6. getRandomColor()