diff --git a/src/main/java/com/iridium/iridiumcolorapi/IridiumColorAPI.java b/src/main/java/com/iridium/iridiumcolorapi/IridiumColorAPI.java index 9633735..efdaa0b 100644 --- a/src/main/java/com/iridium/iridiumcolorapi/IridiumColorAPI.java +++ b/src/main/java/com/iridium/iridiumcolorapi/IridiumColorAPI.java @@ -232,6 +232,7 @@ private static ChatColor[] createRainbow(int step, float saturation) { */ @Nonnull private static ChatColor[] createGradient(@Nonnull Color start, @Nonnull Color end, int step) { + step = Math.max(step,2); ChatColor[] colors = new ChatColor[step]; int stepR = Math.abs(start.getRed() - end.getRed()) / (step - 1); int stepG = Math.abs(start.getGreen() - end.getGreen()) / (step - 1);