Here you can find the source of randomColorFactor()
public static long randomColorFactor()
//package com.java2s; //License from project: Open Source License public class Main { public static long randomColorFactor() { return Math.round(Math.random() * 255); }/*from w ww . j ava 2 s . c o m*/ }