ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyColorRGBA, Poolable { public static ColorRGBA randomColor(final ColorRGBA store) { ColorRGBA result = store; if (result == null) { result = new ColorRGBA(); } result._r = MathUtils.nextRandomFloat(); result._g = MathUtils.nextRandomFloat(); result._b = MathUtils.nextRandomFloat(); result._a = 1.0f; return result; } ColorRGBA();  ColorRGBA(final ReadOnlyColorRGBA src);  ColorRGBA(final float r, final float g, final float b, final float a); @Override float getRed(); @Override float getGreen(); @Override float getBlue(); @Override float getAlpha(); @Override float getValue(final int index); void setValue(final int index, final float value); @Override float[] toArray(float[] store); void setRed(final float r); void setGreen(final float g); void setBlue(final float b); void setAlpha(final float a); ColorRGBA set(final float r, final float g, final float b, final float a); ColorRGBA set(final ReadOnlyColorRGBA source); ColorRGBA zero(); @Override ColorRGBA clamp(final ColorRGBA store); ColorRGBA clampLocal(); static ColorRGBA randomColor(final ColorRGBA store); @Override int asIntARGB(); @Override int asIntRGBA(); ColorRGBA fromIntARGB(final int color); ColorRGBA fromIntRGBA(final int color); @Override String asHexRRGGBBAA(); @Override ColorRGBA add(final float r, final float g, final float b, final float a, final ColorRGBA store); ColorRGBA addLocal(final float r, final float g, final float b, final float a); @Override ColorRGBA add(final ReadOnlyColorRGBA source, final ColorRGBA store); ColorRGBA addLocal(final ReadOnlyColorRGBA source); @Override ColorRGBA subtract(final float r, final float g, final float b, final float a, final ColorRGBA store); ColorRGBA subtractLocal(final float r, final float g, final float b, final float a); @Override ColorRGBA subtract(final ReadOnlyColorRGBA source, final ColorRGBA store); ColorRGBA subtractLocal(final ReadOnlyColorRGBA source); @Override ColorRGBA multiply(final float scalar, final ColorRGBA store); ColorRGBA multiplyLocal(final float scalar); @Override ColorRGBA multiply(final ReadOnlyColorRGBA scale, final ColorRGBA store); ColorRGBA multiplyLocal(final ReadOnlyColorRGBA scale); @Override ColorRGBA divide(final float scalar, final ColorRGBA store); ColorRGBA divideLocal(final float scalar); @Override ColorRGBA divide(final ReadOnlyColorRGBA scale, final ColorRGBA store); ColorRGBA divideLocal(final ReadOnlyColorRGBA scale); @Override ColorRGBA lerp(final ReadOnlyColorRGBA endColor, final float scalar, final ColorRGBA store); ColorRGBA lerpLocal(final ReadOnlyColorRGBA endColor, final float scalar); static ColorRGBA lerp(final ReadOnlyColorRGBA beginColor, final ReadOnlyColorRGBA endColor, final float scalar,
      final ColorRGBA store); ColorRGBA lerpLocal(final ReadOnlyColorRGBA beginColor, final ReadOnlyColorRGBA endColor, final float scalar); static boolean isValid(final ReadOnlyColorRGBA color); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object o); @Override ColorRGBA clone(); @Override Class<? extends ColorRGBA> getClassTag(); @Override void write(final OutputCapsule capsule); @Override void read(final InputCapsule capsule); @Override void readExternal(final ObjectInput in); @Override void writeExternal(final ObjectOutput out); final static ColorRGBA fetchTempInstance(); final static void releaseTempInstance(final ColorRGBA color); static ColorRGBA parseColor(final String colorString, final ColorRGBA store); static final ReadOnlyColorRGBA BLACK; static final ReadOnlyColorRGBA BLACK_NO_ALPHA; static final ReadOnlyColorRGBA WHITE; static final ReadOnlyColorRGBA DARK_GRAY; static final ReadOnlyColorRGBA GRAY; static final ReadOnlyColorRGBA LIGHT_GRAY; static final ReadOnlyColorRGBA RED; static final ReadOnlyColorRGBA GREEN; static final ReadOnlyColorRGBA BLUE; static final ReadOnlyColorRGBA YELLOW; static final ReadOnlyColorRGBA MAGENTA; static final ReadOnlyColorRGBA CYAN; static final ReadOnlyColorRGBA ORANGE; static final ReadOnlyColorRGBA BROWN; static final ReadOnlyColorRGBA PINK; }
@Test public void testRandomColor() { final ColorRGBA clr1 = new ColorRGBA(0, 0, 0, 0); MathUtils.setRandomSeed(0); ColorRGBA.randomColor(clr1); assertEquals(new ColorRGBA(0.73096776f, 0.831441f, 0.24053639f, 1.0f), clr1); final ColorRGBA clr2 = ColorRGBA.randomColor(null); assertEquals(new ColorRGBA(0.6063452f, 0.6374174f, 0.30905056f, 1.0f), clr2); }