 }
 
 extension PastelView: CAAnimationDelegate {
-    func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
+    public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
         if flag {
             gradient.colors = currentGradientSet()
             animateGradient()

        gradient.add(animation, forKey: Animation.key)
    }
    
    override func removeFromSuperview() {
        super.removeFromSuperview()
        gradient.removeAllAnimations()
        gradient.removeFromSuperlayer()


import UIKit

public class PastelView: UIView {

    struct Animation {
        static let keyPath = "colors"
