public static Color randomColor(Color[] currentColors, int minTotalOffset) {
		int maxOffset = minTotalOffset + 1;
		int r = 0, g = 0, b = 0;
		Random randGen = new Random(System.currentTimeMillis());
		while(maxOffset < minTotalOffset) {
			maxOffset = 0;
			r = Math.abs(randGen.nextInt()%256);
			g = Math.abs(randGen.nextInt()%256);
			b = Math.abs(randGen.nextInt()%256);
			for(int i = 0; i < currentColors.length; ++i) {
				int thisOffset = Math.abs((int) ( (double) currentColors[i].getRed()*255.0) - r) +
		  		  		  		 Math.abs((int) ( (double) currentColors[i].getGreen()*255.0) - g) +
		  		  		  		 Math.abs((int) ( (double) currentColors[i].getBlue()*255.0) - b);
				if(thisOffset > maxOffset)
					maxOffset = thisOffset;
			}
		}
		return new Color((double)r/255.0, (double)g/255.0, (double)b/255.0, 1.0);
	}