--set color

function Color:SetColor(color : Color3)
	local hue,saturation,value = color:ToHSV()
	self.Color = color
	
	local wheelSize = self.Instance.Wheel.Image.AbsoluteSize
	local wheelMidPos = (wheelSize / 2)
	local maxDist = (wheelSize.X / 2)
	
	local vector = Vector2.new(0.5,0.5)
	
	local hueVector = Vector2.new(-1,0)
	hueVector = rotateVector(hueVector,hue * -360)
	hueVector = rotateVector(hueVector,180)
	
	vector -= hueVector * saturation * 0.5
	self.Instance.Wheel.Image.Select.Position = UDim2.fromScale(vector.X,vector.Y)
	self.Instance.Right.Value.Select.Position = UDim2.new(0,0,1 - value,0)
	
	self:UpdateColor()
	self:SetValueGradient(hue,saturation)
end

return Color
