@Test public void testColor3() throws Exception { int color = WXResourceUtils.getColor("rgba(50%,50%,50%, 0.5)"); assertEquals(color, 0x7f7f7f7f); color = WXResourceUtils.getColor("rgba( 50%, 50% , 50% , 0.5 )"); assertEquals(color, 0x7f7f7f7f); color = WXResourceUtils.getColor("rgba(255, 255, 255, 1.0)"); assertEquals(color, 0xffffffff); color = WXResourceUtils.getColor("rgba(1%, 1% ,1%, 1)"); assertEquals(color, 0xff020202); color = WXResourceUtils.getColor("rgba(0%, 0, 1%, 0.1)"); assertEquals(color, 0x19000002); color = WXResourceUtils.getColor("rgba(100%, 100%, 100%, 0.1)"); assertEquals(color, 0x19ffffff); color = WXResourceUtils.getColor("rgba(1, 1, 1, 1.0)"); assertEquals(color, 0xff010101); color = WXResourceUtils.getColor("rgba(0.1, 0.1, 0.1, 1.0)"); assertEquals(color, Integer.MIN_VALUE); color = WXResourceUtils.getColor("rgba(10.0%, 101%, -0.1, 50%)"); assertEquals(color, Integer.MIN_VALUE); }
public static int getColor(String color) { return getColor(color, Integer.MIN_VALUE); }
WXResourceUtils { public static int getColor(String color) { return getColor(color, Integer.MIN_VALUE); } }
WXResourceUtils { public static int getColor(String color) { return getColor(color, Integer.MIN_VALUE); }  }
WXResourceUtils { public static int getColor(String color) { return getColor(color, Integer.MIN_VALUE); }  static int getColor(String color); static int getColor(String color, int defaultColor); static Shader getShader(String image, float width, float height); }
WXResourceUtils { public static int getColor(String color) { return getColor(color, Integer.MIN_VALUE); }  static int getColor(String color); static int getColor(String color, int defaultColor); static Shader getShader(String image, float width, float height);  }