-- Decompiled with the Synapse X Luau decompiler.

client = nil;
service = nil;
return function(p1)
	local v1 = p1.Color or Color3.new(1, 1, 1);
	local v2 = {
		Name = "ColorPicker", 
		Title = p1.Title and "Color Picker", 
		Icon = client.MatIcons.Create, 
		Size = { 250, 230 }, 
		MinSize = { 150, 230 }, 
		MaxSize = { math.huge, 230 }, 
		SizeLocked = true
	};
	local u1 = nil;
	local u2 = v1;
	function v2.OnClose()
		if not u1 then
			u1 = u2;
		end;
	end;
	local v3 = client.UI.Make("Window", v2);
	local v4 = {
		Text = "Accept", 
		Size = UDim2.new(1, -10, 0, 20), 
		Position = UDim2.new(0, 5, 0, 175)
	};
	local v5 = {};
	function v5.MouseButton1Down()
		u1 = u2;
		v3:Close();
	end;
	v4.Events = v5;
	local v6 = v3:Add("TextButton", v4);
	local u3 = v1.r;
	local u4 = v1.g;
	local u5 = v1.b;
	local u6 = v3:Add("Frame", {
		Size = UDim2.new(1, -10, 0, 20), 
		Position = UDim2.new(0, 5, 0, 150), 
		BackgroundColor3 = u2
	});
	local u7 = nil;
	local u8 = nil;
	local u9 = nil;
	local u10 = nil;
	local u11 = nil;
	local u12 = nil;
	local v7 = {
		Text = "Red: ", 
		BoxText = u3 * 255, 
		BackgroundTransparency = 1, 
		TextSize = 20, 
		Size = UDim2.new(1, -20, 0, 20), 
		Position = UDim2.new(0, 10, 0, 0)
	};
	local function u13()
		u2 = Color3.new(u3, u4, u5);
		u6.BackgroundColor3 = u2;
		u7:SetValue(math.floor(u3 * 255));
		u8.SliderBar.ImageColor3 = Color3.new(0, 0, 0):lerp(Color3.new(1, 0, 0), u3);
		u8:SetValue(u3);
		u9:SetValue(math.floor(u4 * 255));
		u10.SliderBar.ImageColor3 = Color3.new(0, 0, 0):lerp(Color3.new(0, 1, 0), u4);
		u10:SetValue(u4);
		u11:SetValue(math.floor(u5 * 255));
		u12.SliderBar.ImageColor3 = Color3.new(0, 0, 0):lerp(Color3.new(0, 0, 1), u5);
		u12:SetValue(u5);
	end;
	function v7.TextChanged(p2, p3, p4)
		if tonumber(p2) then
			local v8 = nil;
			p2 = math.floor(tonumber(p2));
			if p2 < 0 then
				v8 = true;
				p2 = 0;
			elseif p2 > 255 then
				v8 = true;
				p2 = 255;
			end;
			u3 = p2 / 255;
			u13();
			if v8 then
				return p2;
			end;
		elseif p3 then
			return u3 * 255;
		end;
	end;
	u7 = v3:Add("StringEntry", v7);
	u9 = v3:Add("StringEntry", {
		Text = "Green: ", 
		BoxText = u4 * 255, 
		BackgroundTransparency = 1, 
		TextSize = 20, 
		Size = UDim2.new(1, -20, 0, 20), 
		Position = UDim2.new(0, 10, 0, 50), 
		TextChanged = function(p5, p6, p7)
			if tonumber(p5) then
				local v9 = false;
				p5 = math.floor(tonumber(p5));
				if p5 < 0 then
					v9 = true;
					p5 = 0;
				elseif p5 > 255 then
					v9 = true;
					p5 = 255;
				end;
				u4 = p5 / 255;
				u13();
				if v9 then
					return p5;
				end;
			elseif p6 then
				return u4 * 255;
			end;
		end
	});
	u11 = v3:Add("StringEntry", {
		Text = "Blue: ", 
		BoxText = u5 * 255, 
		BackgroundTransparency = 1, 
		TextSize = 20, 
		Size = UDim2.new(1, -20, 0, 20), 
		Position = UDim2.new(0, 10, 0, 100), 
		TextChanged = function(p8, p9, p10)
			if tonumber(p8) then
				local v10 = false;
				p8 = math.floor(tonumber(p8));
				if p8 < 0 then
					v10 = true;
					p8 = 0;
				elseif p8 > 255 then
					v10 = true;
					p8 = 255;
				end;
				u5 = p8 / 255;
				u13();
				if v10 then
					return p8;
				end;
			elseif p9 then
				return u5 * 255;
			end;
		end
	});
	u8 = v3:Add("Slider", {
		Percent = u2.r, 
		Size = UDim2.new(1, -20, 0, 20), 
		Position = UDim2.new(0, 10, 0, 25), 
		OnSlide = function(p11)
			u3 = p11;
			u13();
		end
	});
	u10 = v3:Add("Slider", {
		Percent = u2.r, 
		Size = UDim2.new(1, -20, 0, 20), 
		Position = UDim2.new(0, 10, 0, 75), 
		OnSlide = function(p12)
			u4 = p12;
			u13();
		end
	});
	u12 = v3:Add("Slider", {
		Percent = u2.r, 
		Size = UDim2.new(1, -20, 0, 20), 
		Position = UDim2.new(0, 10, 0, 125), 
		OnSlide = function(p13)
			u5 = p13;
			u13();
		end
	});
	u13();
	local l__gTable__11 = v3.gTable;
	v3:ResizeCanvas();
	v3:Ready();
	while true do
		wait();
		if u1 then
			break;
		end;
		if not l__gTable__11.Active then
			break;
		end;	
	end;
	return nil;
end;