(int color, int pos)
| 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); |
no test coverage detected