Random random = new Random(); //随机类 //通过rgb三色随机得到新的颜色 red = random.nextInt(255); green = random.nextInt(255); blue = random.nextInt(255);