         progressLayer.startAngle = UtilityFunctions.Mod(startAngle, range: 360, minMax: (0,360))
         progressLayer.clockwise = clockwise
         progressLayer.roundedCorners = roundedCorners
+        progressLayer.lerpColorMode = lerpColorMode
         progressLayer.gradientRotateSpeed = gradientRotateSpeed
         progressLayer.glowAmount = UtilityFunctions.Clamp(glowAmount, minMax: (0, 1))
         progressLayer.glowMode = glowMode

                
                drawGradientWithContext(ctx, componentsArray: componentsArray)
            } else {
                if colorsArray.count == 1 {
                    fillRectWithContext(ctx, color: colorsArray[0])
                } else {
                    fillRectWithContext(ctx, color: UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0))
                }
            }
            CGContextRestoreGState(ctx)
            UIGraphicsPopContext()

            }
        }
        
        static func InverseLerp(value: CGFloat, minMax: (CGFloat, CGFloat)) -> CGFloat {
            return (value - minMax.0) / (minMax.1 - minMax.0)
        }
        
        static func Lerp(value: CGFloat, minMax: (CGFloat, CGFloat)) -> CGFloat {
            return (minMax.1 - minMax.0) * value + minMax.0
        }
        
        static func ColorLerp(var value: CGFloat, minMax: (UIColor, UIColor)) -> UIColor {
            value = Clamp(value, minMax: (0, 1))
            
            let zero: CGFloat = 0
            
            var (r0, g0, b0, a0) = (zero, zero, zero, zero)
            minMax.0.getRed(&r0, green: &g0, blue: &b0, alpha: &a0)
            
            var (r1, g1, b1, a1) = (zero, zero, zero, zero)
            minMax.1.getRed(&r1, green: &g1, blue: &b1, alpha: &a1)
            
            return UIColor(red: Lerp(value, minMax: (r0, r1)), green: Lerp(value, minMax: (g0, g1)), blue: Lerp(value, minMax: (b0, b1)), alpha: Lerp(value, minMax: (a0, a1)))
        }
        
        static func Mod(value: Int, range: Int, minMax: (Int, Int)) -> Int {
            let (min, max) = minMax
            assert(abs(range) <= abs(max - min), "range should be <= than the interval")
