 		let point = touch!.locationInView(self)
 		currentSelectionX = point.x
 		currentSelectionY = point.y
-		//color = UIColor(hue: CGFloat(currentSelectionY / self.frame.size.height), saturation: 1.0, brightness: 1.0, alpha: 1.0)
-		color = UIColor(hue: CGFloat(currentSelectionX / self.frame.size.width), saturation: 1.0, brightness: 1.0, alpha: 1.0)
+		
+		let hue: CGFloat = (direction == .Horizontal ? CGFloat(currentSelectionX / self.frame.size.width) : CGFloat(currentSelectionY / self.frame.size.height))
+		color = UIColor(hue: hue, saturation: 1.0, brightness: 1.0, alpha: 1.0)
 		
 		if delegate != nil {
 			delegate.valuePicked(color, type: type)

		let point = touch!.locationInView(self)
		currentSelectionX = point.x
		currentSelectionY = point.y
		//color = UIColor(hue: CGFloat(currentSelectionY / self.frame.size.height), saturation: 1.0, brightness: 1.0, alpha: 1.0)
		color = UIColor(hue: CGFloat(currentSelectionX / self.frame.size.width), saturation: 1.0, brightness: 1.0, alpha: 1.0)
		
		if delegate != nil {
			delegate.valuePicked(color, type: type)

		let point = touch!.locationInView(self)
		currentSelectionX = point.x
		currentSelectionY = point.y
		
		let hue: CGFloat = (direction == .Horizontal ? CGFloat(currentSelectionX / self.frame.size.width) : CGFloat(currentSelectionY / self.frame.size.height))
		color = UIColor(hue: hue, saturation: 1.0, brightness: 1.0, alpha: 1.0)
		
		if delegate != nil {
			delegate.valuePicked(color, type: type)
