 		}
 	}
 	
-    // MARK: Internal
+	@IBInspectable public var borderRadius: CGFloat = 3.0 {
+		didSet {
+			drawLayer.cornerRadius = borderRadius
+		}
+	}
+
+	// MARK: Internal
+
 	/// Internal `CAGradientLayer` used for drawing the `ColorSlider`.
-    private var drawLayer: CAGradientLayer = CAGradientLayer()
-	
+	private lazy var drawLayer: CAGradientLayer = {
+		let dl = CAGradientLayer()
+		self.layer.insertSublayer(dl, at: 0)
+		return dl
+	}()
+
 	/// The hue of the current color.
     private var hue: CGFloat = 0
 	

			}
        }
    }
	
	/// Draws necessary parts of the `ColorSlider`.
    public override func draw(_ rect: CGRect) {
        super.draw(rect)
        
		// Draw pill shape
		let shortestSide = (bounds.width > bounds.height) ? bounds.height : bounds.width
		drawLayer.cornerRadius = shortestSide / 2.0
		
        // Draw background
		drawLayer.frame = bounds
        if drawLayer.superlayer == nil {
            layer.insertSublayer(drawLayer, at: 0)
        }
    }
    
    // MARK: - Preview
	///	Shows the color preview.
	///
	///	- parameter touch: The touch that triggered the update.

	public func commonInit() {
		backgroundColor = UIColor.clear
		
		drawLayer.frame = layer.bounds
		drawLayer.masksToBounds = true
		drawLayer.cornerRadius = borderRadius
		drawLayer.borderColor = borderColor.cgColor
		drawLayer.borderWidth = borderWidth
		drawLayer.startPoint = CGPoint(x: 0.5, y: 1)
