title: How can I generate a list of semi-random colours?
body: <p>I want to go through a list of random generated colours and check if they differ from each other. Not as in <code>colour1 == colour2</code>, but making sure that the generated colours are not too similar.</p>
  
  <p>I mean to use this code (or something like it) to generate the colourlist:</p>
  
  <pre><code>Random randomGenerator = new Random();
  ArrayList&lt;Color&gt; colours = new ArrayList&lt;Color&gt;();
  while(true) {
      int red = randomGenerator.nextInt(255);
      int green = randomGenerator.nextInt(255);
      int blue = randomGenerator.nextInt(255);
      Color randomColour = new Color(red,green,blue);
      if(!colours.contains(randomColour)) {
          colours.add(randomColour);
      }
      if(colours.size() &gt;= 100) {
          break;
      }
  }
  </code></pre>