Hotfix xsome exceptions

This commit is contained in:
2025-03-03 09:42:39 +01:00
parent 0a60654a28
commit b4eab65757
3 changed files with 32 additions and 24 deletions
@@ -32,6 +32,13 @@ public class Gradient {
}
public Color getColor(double value, double maxValue) {
if (colors.isEmpty()) {
return Color.BLACK;
}
if (colors.size() == 1) {
return colors.get(0);
}
value /= maxValue / (double) (colors.size() - 1);
return lerpColor(