diff --git a/src/Artemis.Core/Models/Profile/Colors/ColorGradient.cs b/src/Artemis.Core/Models/Profile/Colors/ColorGradient.cs index 060c2b0e6..3615fbfbc 100644 --- a/src/Artemis.Core/Models/Profile/Colors/ColorGradient.cs +++ b/src/Artemis.Core/Models/Profile/Colors/ColorGradient.cs @@ -245,6 +245,10 @@ public class ColorGradient : IList, IList, INotifyCollectionC //if the position is before the first stop, return that color if (stop2Index == 0) return _stops[0].Color; + + //if the position is after the last stop, return that color + if (stop2Index == -1) + return _stops[^1].Color; //interpolate between that one and the one before int stop1Index = stop2Index - 1;