You can try to define a custom ColorMatrix with random rgb values:
Random rand = new Random(); int r = rand.nextInt(256); int g = rand.nextInt(256); int b = rand.nextInt(256); ColorMatrix cm = new ColorMatrix(); cm.set(new float[] { 1, 0, 0, 0, r, 0, 1, 0, 0, g, 0, 0, 1, 0, b, 0, 0, 0, 1, 0 });
Hope this helps.
peekler
source share