Here you can find the source of randomColor(Random r)
public static Color randomColor(Random r)
//package com.java2s; //License from project: Open Source License import java.awt.*; import java.util.*; public class Main { public static Color randomColor(Random r) { return new Color(r.nextInt(127) + 127, r.nextInt(127) + 127, r.nextInt(127) + 127);/*from w ww . j av a 2 s . com*/ } }