diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/utils/ColorTemplate.java b/MPChartLib/src/main/java/com/github/mikephil/charting/utils/ColorTemplate.java index 78317eb36..f725147d2 100644 --- a/MPChartLib/src/main/java/com/github/mikephil/charting/utils/ColorTemplate.java +++ b/MPChartLib/src/main/java/com/github/mikephil/charting/utils/ColorTemplate.java @@ -1,7 +1,6 @@ package com.github.mikephil.charting.utils; -import android.content.res.Resources; import android.graphics.Color; import java.util.ArrayList; @@ -62,7 +61,7 @@ public static int rgb(String hex) { int color = (int) Long.parseLong(hex.replace("#", ""), 16); int r = (color >> 16) & 0xFF; int g = (color >> 8) & 0xFF; - int b = (color >> 0) & 0xFF; + int b = (color) & 0xFF; return Color.rgb(r, g, b); } @@ -81,23 +80,7 @@ public static int colorWithAlpha(int color, int alpha) { return (color & 0xffffff) | ((alpha & 0xff) << 24); } - /** - * turn an array of resource-colors (contains resource-id integers) into an - * array list of actual color integers - * @param colors an integer array of resource id's of colors - */ - public static List createColors(Resources r, int[] colors) { - - List result = new ArrayList<>(); - - for (int i : colors) { - result.add(r.getColor(i)); - } - - return result; - } - - /** + /** * Turns an array of colors (integer color values) into an ArrayList of colors. */ public static List createColors(int[] colors) {