Java Random Double randomColor(double d)

Here you can find the source of randomColor(double d)

Description

random Color

License

Open Source License

Declaration

public static String randomColor(double d) 

Method Source Code

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

public class Main {
    public static String randomColor(double d) {
        return "rgba(" + randomColorFactor() + "," + randomColorFactor() + "," + randomColorFactor() + "," + d
                + ")";
    }//  www  .ja va  2s .c  o  m

    public static long randomColorFactor() {
        return Math.round(Math.random() * 255);
    }
}

Related

  1. random(double min, double max)
  2. random(final double min, final double max)
  3. randomBetween(double arg1, double arg2)
  4. randomBoth(double range)
  5. randomChance(double chance)
  6. randomDouble()
  7. randomDouble()
  8. randomDouble()
  9. randomDouble()