MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / getColorInt

Method getColorInt

src/main/java/Colors/ColorTheme.java:342–353  ·  view source on GitHub ↗
(int color, int pos)

Source from the content-addressed store, hash-verified

340 }
341
342 public static int getColorInt(int color, int pos) {
343 String ncolor = getColorString(color);
344 switch (pos) {
345 case 0:
346 return Integer.parseInt(ncolor.substring(2,4),16);
347 case 1:
348 return Integer.parseInt(ncolor.substring(4,6),16);
349 case 2:
350 return Integer.parseInt(ncolor.substring(6,8),16);
351 }
352 return -1;
353 }
354
355 public static int getColorInt(String color) {
356 return Integer.parseInt(color.substring(2),16);

Callers 2

eventOkMethod · 0.95
loadIntMethod · 0.95

Calls 1

getColorStringMethod · 0.95

Tested by

no test coverage detected