diff --git a/src/main/micycle/peasygradients/gradient/Gradient.java b/src/main/micycle/peasygradients/gradient/Gradient.java index d30dcd2..4baf5ea 100644 --- a/src/main/micycle/peasygradients/gradient/Gradient.java +++ b/src/main/micycle/peasygradients/gradient/Gradient.java @@ -206,7 +206,7 @@ public int getColor(float position) { /** * Treat alpha separately (to simplify colorspace classes) */ - int alpha = (int) Math.floor((currStop.alpha + (position * (prevStop.alpha - currStop.alpha))) + 0.5d); // TODO sometimes 254? + int alpha = (int) Math.floor((prevStop.alpha + (position * (currStop.alpha - prevStop.alpha))) + 0.5d); // TODO sometimes 254? /** * Finally convert the given colorspace value to sARGB int to eventually write