title: Algorithm to randomly generate a color palette in Delphi
body: <p>How to beautifully generate random colors in Delphi?
  I have this code in java, but I didn't manage to translate into Delphi.</p>
  
  <pre><code>public Color generateRandomColor(Color mix) {
      Random random = new Random();
      int red = random.nextInt(256);
      int green = random.nextInt(256);
      int blue = random.nextInt(256);
  
      // mix the color
      if (mix != null) {
          red = (red + mix.getRed()) / 2;
          green = (green + mix.getGreen()) / 2;
          blue = (blue + mix.getBlue()) / 2;
      }
  
      Color color = new Color(red, green, blue);
      return color;
  }
  </code></pre>