title: how could i compare colors in java?
body: <p>im trying to make a random color generator but i dont want similar colors to show up in the arrayList</p>
  
  <pre><code>public class RandomColorGen {
  
  public static Color RandColor() {
      Random rand = new Random();
      float r = rand.nextFloat();
      float g = rand.nextFloat();
      float b = rand.nextFloat();
      Color c = new Color(r, g, b, 1);
      return c;
  
  }
  
  public static ArrayList&lt;Color&gt; ColorList(int numOfColors) {
      ArrayList&lt;Color&gt; colorList = new ArrayList&lt;Color&gt;();
      for (int i = 0; i &lt; numOfColors; i++) {
          Color c = RandColor();
          if(similarcolors){
              dont add
          }
          colorList.add(c);
  
      }
      return colorList;
  }
  
  }
  </code></pre>
  
  <p>I'm really confused please help :)</p>