Color implements ReadonlyColor, Animates<ReadonlyColor> { @Override public int getRGBA() { return ((((int) (getRed() * 255.0)) & 0xff) << 24) | ((((int) (getGreen() * 255.0)) & 0xff) << 16) | ((((int) (getBlue() * 255.0)) & 0xff) << 8) | (((int) (getAlpha() * 255.0)) & 0xff); } Color(double red, double green, double blue, double alpha);  Color(double red, double green, double blue);  Color(int rgba);  Color(ReadonlyColor other); @Override Color copy(); @Override double getRed(); @Override double getGreen(); @Override double getBlue(); @Override double getAlpha(); @Override int getRGBA(); @Override int getARGB(); @Override void glApply(); @Override void glApply(double alphaScale); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); Color setRed(double red); Color setGreen(double green); Color setBlue(double blue); Color setAlpha(double alpha); Color set(double red, double green, double blue, double alpha); Color set(ReadonlyColor other); Color scaleRGB(double factor); Color scaleAlpha(double factor); Color blend(ReadonlyColor other, double percent); Color setRGBA(int rgba); Color setRandom(); Color setRandomRGB(); @Override boolean isAnimating(); @Override Color animateStop(); @Override Color animateStart(ReadonlyColor toColor, long durationMs); Color animateStart(double toRed, double toGreen, double toBlue, double toAlpha, long durationMs); @Override Color animateStartLoop(ReadonlyColor toColor, boolean reverse, long durationMs); Color animateStartLoop(double toRed, double toGreen, double toBlue, double toAlpha, boolean reverse, long durationMs); static ReadonlyColor getNamedColor(String name); static int convertARGBtoRGBA(int argb); static int convertRGBAtoARGB(int rgba); static final ReadonlyColor ALICE_BLUE; static final ReadonlyColor ANTIQUE_WHITE; static final ReadonlyColor AQUA; static final ReadonlyColor AQUAMARINE; static final ReadonlyColor AZURE; static final ReadonlyColor BEIGE; static final ReadonlyColor BISQUE; static final ReadonlyColor BLACK; static final ReadonlyColor BLANCHED_ALMOND; static final ReadonlyColor BLUE; static final ReadonlyColor BLUE_VIOLET; static final ReadonlyColor BROWN; static final ReadonlyColor BURLY_WOOD; static final ReadonlyColor CADET_BLUE; static final ReadonlyColor CHARTREUSE; static final ReadonlyColor CHOCOLATE; static final ReadonlyColor CORAL; static final ReadonlyColor CORNFLOWER_BLUE; static final ReadonlyColor CORNSILK; static final ReadonlyColor CRIMSON; static final ReadonlyColor CYAN; static final ReadonlyColor DARK_BLUE; static final ReadonlyColor DARK_CYAN; static final ReadonlyColor DARK_GOLDENROD; static final ReadonlyColor DARK_GRAY; static final ReadonlyColor DARK_GREEN; static final ReadonlyColor DARK_GREY; static final ReadonlyColor DARK_KHAKI; static final ReadonlyColor DARK_MAGENTA; static final ReadonlyColor DARK_OLIVE_GREEN; static final ReadonlyColor DARK_ORANGE; static final ReadonlyColor DARK_ORCHID; static final ReadonlyColor DARK_RED; static final ReadonlyColor DARK_SALMON; static final ReadonlyColor DARK_SEA_GREEN; static final ReadonlyColor DARK_SLATE_BLUE; static final ReadonlyColor DARK_SLATE_GRAY; static final ReadonlyColor DARK_SLATE_GREY; static final ReadonlyColor DARK_TURQUOISE; static final ReadonlyColor DARK_VIOLET; static final ReadonlyColor DEEP_PINK; static final ReadonlyColor DEEP_SKY_BLUE; static final ReadonlyColor DIM_GRAY; static final ReadonlyColor DIM_GREY; static final ReadonlyColor DODGER_BLUE; static final ReadonlyColor FIRE_BRICK; static final ReadonlyColor FLORAL_WHITE; static final ReadonlyColor FOREST_GREEN; static final ReadonlyColor FUCHSIA; static final ReadonlyColor GAINSBORO; static final ReadonlyColor GHOST_WHITE; static final ReadonlyColor GOLD; static final ReadonlyColor GOLDENROD; static final ReadonlyColor GRAY; static final ReadonlyColor GREEN; static final ReadonlyColor GREEN_YELLOW; static final ReadonlyColor GREY; static final ReadonlyColor HONEYDEW; static final ReadonlyColor HOT_PINK; static final ReadonlyColor INDIAN_RED; static final ReadonlyColor INDIGO; static final ReadonlyColor IVORY; static final ReadonlyColor KHAKI; static final ReadonlyColor LAVENDER; static final ReadonlyColor LAVENDER_BLUSH; static final ReadonlyColor LAWN_GREEN; static final ReadonlyColor LEMON_CHIFFON; static final ReadonlyColor LIGHT_BLUE; static final ReadonlyColor LIGHT_CORAL; static final ReadonlyColor LIGHT_CYAN; static final ReadonlyColor LIGHT_GOLDENROD_YELLOW; static final ReadonlyColor LIGHT_GRAY; static final ReadonlyColor LIGHT_GREEN; static final ReadonlyColor LIGHT_GREY; static final ReadonlyColor LIGHT_PINK; static final ReadonlyColor LIGHT_SALMON; static final ReadonlyColor LIGHT_SEA_GREEN; static final ReadonlyColor LIGHT_SKY_BLUE; static final ReadonlyColor LIGHT_SLATE_GRAY; static final ReadonlyColor LIGHT_SLATE_GREY; static final ReadonlyColor LIGHT_STEEL_BLUE; static final ReadonlyColor LIGHT_YELLOW; static final ReadonlyColor LIME; static final ReadonlyColor LIME_GREEN; static final ReadonlyColor LINEN; static final ReadonlyColor MAGENTA; static final ReadonlyColor MAROON; static final ReadonlyColor MEDIUM_AQUAMARINE; static final ReadonlyColor MEDIUM_BLUE; static final ReadonlyColor MEDIUM_ORCHID; static final ReadonlyColor MEDIUM_PURPLE; static final ReadonlyColor MEDIUM_SEA_GREEN; static final ReadonlyColor MEDIUM_SLATE_BLUE; static final ReadonlyColor MEDIUM_SPRING_GREEN; static final ReadonlyColor MEDIUM_TURQUOISE; static final ReadonlyColor MEDIUM_VIOLET_RED; static final ReadonlyColor MIDNIGHT_BLUE; static final ReadonlyColor MINT_CREAM; static final ReadonlyColor MISTY_ROSE; static final ReadonlyColor MOCCASIN; static final ReadonlyColor NAVAJO_WHITE; static final ReadonlyColor NAVY; static final ReadonlyColor OLD_LACE; static final ReadonlyColor OLIVE; static final ReadonlyColor OLIVE_DRAB; static final ReadonlyColor ORANGE; static final ReadonlyColor ORANGE_RED; static final ReadonlyColor ORCHID; static final ReadonlyColor PALE_GOLDENROD; static final ReadonlyColor PALE_GREEN; static final ReadonlyColor PALE_TURQUOISE; static final ReadonlyColor PALE_VIOLET_RED; static final ReadonlyColor PAPAYA_WHIP; static final ReadonlyColor PEACH_PUFF; static final ReadonlyColor PERU; static final ReadonlyColor PINK; static final ReadonlyColor PLUM; static final ReadonlyColor POWDER_BLUE; static final ReadonlyColor PURPLE; static final ReadonlyColor RED; static final ReadonlyColor ROSY_BROWN; static final ReadonlyColor ROYAL_BLUE; static final ReadonlyColor SADDLE_BROWN; static final ReadonlyColor SALMON; static final ReadonlyColor SANDY_BROWN; static final ReadonlyColor SEA_GREEN; static final ReadonlyColor SEASHELL; static final ReadonlyColor SIENNA; static final ReadonlyColor SILVER; static final ReadonlyColor SKY_BLUE; static final ReadonlyColor SLATE_BLUE; static final ReadonlyColor SLATE_GRAY; static final ReadonlyColor SLATE_GREY; static final ReadonlyColor SNOW; static final ReadonlyColor SPRING_GREEN; static final ReadonlyColor STEEL_BLUE; static final ReadonlyColor TAN; static final ReadonlyColor TEAL; static final ReadonlyColor THISTLE; static final ReadonlyColor TOMATO; static final ReadonlyColor TURQUOISE; static final ReadonlyColor VIOLET; static final ReadonlyColor WHEAT; static final ReadonlyColor WHITE; static final ReadonlyColor WHITE_SMOKE; static final ReadonlyColor YELLOW; static final ReadonlyColor YELLOW_GREEN; static final ReadonlyColor TRANSPARENT_BLACK; static final ReadonlyColor TRANSPARENT_WHITE; }
@Test public void testConstructors() { assertEquals(0x3fbf7ff2, new Color(0.25, 0.75, 0.5, 0.95).getRGBA()); assertEquals(0x3fbf7fff, new Color(0.25, 0.75, 0.5).getRGBA()); assertEquals(0xff00ffff, new Color(Color.MAGENTA).getRGBA()); assertEquals(0xdeadbeef, new Color(0xdeadbeef).getRGBA()); assertEquals(0xffffff85, new Color(-123).getRGBA()); }