     /// The ending color of the gradient.
     @IBInspectable var endingColor: NSColor? {
         didSet {
-            // Make a copy to avoid sharing.
-            endingColor = endingColor?.copy() as? NSColor
-
             needsDisplay = true
         }
     }

        // the starting color. Otherwise, draw only the starting color.
        if let endingColor = endingColor, endingColor != startingColor {
            let gradient = NSGradient(starting: startingColor, ending: endingColor)
            gradient?.draw(in: dirtyRect, angle: angle)
        } else {
            startingColor.setFill()
            dirtyRect.fill()
        }
    }


    /// The starting color of the gradient.
    @IBInspectable var startingColor: NSColor? {
        didSet {
            needsDisplay = true
        }
    }
