Fixed color methods

This commit is contained in:
Anuken
2020-03-19 20:14:37 -04:00
parent d2a2311cce
commit d91ff744f2
2 changed files with 3 additions and 3 deletions

View File

@@ -27,8 +27,8 @@ def transformColors = { List<List<String>> list ->
} }
newColors.each{ color -> newColors.each{ color ->
colorMap.put(Color.argb8888(color), newColors) colorMap.put(color.argb8888(), newColors)
colorIndexMap.put(Color.argb8888(color), newColors.indexOf(color)) colorIndexMap.put(color.argb8888(), newColors.indexOf(color))
} }
} }
} }

View File

@@ -50,7 +50,7 @@ class Image{
Color getColor(int x, int y){ Color getColor(int x, int y){
if(!Structs.inBounds(x, y, width, height)) return color.set(0, 0, 0, 0); if(!Structs.inBounds(x, y, width, height)) return color.set(0, 0, 0, 0);
int i = image.getRGB(x, y); int i = image.getRGB(x, y);
Color.argb8888ToColor(color, i); color.argb8888(i);
return color; return color;
} }