         
         CATransaction.commit()
     }
+    
+    func updateBackgroundGradient() {
+        
+        CATransaction.begin()
+        CATransaction.setDisableActions(true)
+        
+        gradientLayer.colors = [backgroundColorTop.cgColor, backgroundColorBottom.cgColor]
+        gradientLayer.startPoint = CGPoint(x: 0.5, y: 0)
+        gradientLayer.endPoint = CGPoint(x: 0.5, y: 1)
+        gradientLayer.locations = [0.0, 1.0]
+        
+        CATransaction.commit()
+    }
 
 
 }

        return minValue.lerp(t: Double(moonOnScreenAmount), end: maxValue)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Add sub layers
        view.layer.addSublayer(sunSideSpoke)
        view.layer.addSublayer(sunDiagonalSpoke)
        view.layer.addSublayer(sunMiddle)

    
    let moon: CAShapeLayer = {
        let layer = CAShapeLayer()
        layer.fillColor = UIColor.white.cgColor
        layer.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
        
        let topPoint = CGPoint(x: layer.bounds.size.width/2,
