From 453b49f55dc4c793ccc07d725104be6285a929e8 Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Wed, 14 Oct 2020 19:13:27 -0700 Subject: [PATCH] [libgdx] Fixed reading dark colors from JSON. --- .../src/com/esotericsoftware/spine/SkeletonJson.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java index 8f6e34111..b186061e5 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java @@ -565,9 +565,9 @@ public class SkeletonJson extends SkeletonLoader { float nb = Integer.parseInt(color.substring(4, 6), 16) / 255f; float na = Integer.parseInt(color.substring(6, 8), 16) / 255f; color = nextMap.getString("dark"); - float nr2 = Integer.parseInt(color.substring(8, 10), 16) / 255f; - float ng2 = Integer.parseInt(color.substring(10, 12), 16) / 255f; - float nb2 = Integer.parseInt(color.substring(12, 14), 16) / 255f; + float nr2 = Integer.parseInt(color.substring(0, 2), 16) / 255f; + float ng2 = Integer.parseInt(color.substring(2, 4), 16) / 255f; + float nb2 = Integer.parseInt(color.substring(4, 6), 16) / 255f; JsonValue curve = keyMap.get("curve"); if (curve != null) { bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, r, nr, 1);