MCPcopy Create free account
hub / github.com/HelloBush/Java_MHXYdemo / dmCToC

Method dmCToC

src/pkgCalc/CalcTool.java:14–25  ·  view source on GitHub ↗

����Įȡɫ����ֵ���ַ���"RRGGBB"ת��ΪColor��ɫ���� @param dmC ��Į��ɫֵ���ַ��� @return ����Color����

(String dmC)

Source from the content-addressed store, hash-verified

12 * @return ����Color����
13 */
14 public static Color dmCToC(String dmC){
15 Color c =null;
16 try{
17 c = new Color(Integer.parseInt(dmC.substring(0, 2),16),
18 Integer.parseInt(dmC.substring(2, 4),16),
19 Integer.parseInt(dmC.substring(4, 6),16));
20 }
21 catch(NumberFormatException e){
22 e.printStackTrace();
23 }
24 return c;
25 }
26}

Callers 2

runMethod · 0.95
GameStateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected