return function()local T=require(script.Parent.GetPerceivedBrightness)it("\116\104\114\111\119\115 \105\102 \097\114\103\117\109\101\110\116 \105\115 \110\111\116 \097 \067\111\108\111\114\051",function()(expect(pcall(T,100))).to.equal(false)end)it("\114\101\116\117\114\110\115 \097 \118\097\108\105\100 \112\101\114\099\101\105\118\101\100 \098\114\105\103\104\116\110\101\115\115 \102\111\114 \098\108\097\099\107",function()(expect(T(Color3.new()))).to.equal(0)end)it("\114\101\116\117\114\110\115 \097 \118\097\108\105\100 \112\101\114\099\101\105\118\101\100 \098\114\105\103\104\116\110\101\115\115 \102\111\114 \119\104\105\116\101",function()(expect(T(Color3.new(1,1,1)))).to.equal(1)end)it("\114\101\116\117\114\110\115 \097 \118\097\108\105\100 \112\101\114\099\101\105\118\101\100 \098\114\105\103\104\116\110\101\115\115 \102\111\114 \109\105\100 \103\114\101\121",function()(expect(T(Color3.new(.5,.5,.5)))).to.be.near(.5,.001)end)it("\114\101\116\117\114\110\115 \097 \118\097\108\105\100 \112\101\114\099\101\105\118\101\100 \098\114\105\103\104\116\110\101\115\115 \102\111\114 \083\116\117\100\105\111 \066\108\117\101",function()(expect(T(Color3.fromRGB(0,161,255)))).to.be.near(.485,.001)end)end
return function()
	local GetPerceivedBrightness = require(script.Parent.GetPerceivedBrightness)

	it("throws if argument is not a Color3", function()
		expect(pcall(GetPerceivedBrightness, 100)).to.equal(false)
	end)

	it("returns a valid perceived brightness for black", function()
		expect(GetPerceivedBrightness(Color3.new())).to.equal(0)
	end)

	it("returns a valid perceived brightness for white", function()
		expect(GetPerceivedBrightness(Color3.new(1, 1, 1))).to.equal(1)
	end)

	it("returns a valid perceived brightness for mid grey", function()
		expect(GetPerceivedBrightness(Color3.new(0.5, 0.5, 0.5))).to.be.near(0.5, 0.001)
	end)

	it("returns a valid perceived brightness for Studio Blue", function()
		expect(GetPerceivedBrightness(Color3.fromRGB(0, 161, 255))).to.be.near(0.485, 0.001)
	end)
end
