local w=require(script.Parent.Parent.Util.BasicallyIdentical)return function()local u=require(script.Parent.GetContrastingColor)local T=Color3.new()local S=Color3.new(1,1,1)local Z=Color3.new(1,1,0)local g=Color3.new(0,0,1)local o=Color3.new(1,0,1)local e=Color3.new(.777,.777,.777)local J=Color3.new(.222,.222,.222)local d=Color3.new(.238,.238,0)local C=Color3.new(.457,.457,1)local s=Color3.new(.448,0,.448)it("\116\104\114\111\119\115 \105\102 \097\114\103\117\109\101\110\116\115 \097\114\101 \110\111\116 \067\111\108\111\114\051\115",function()(expect(pcall(u,T,true))).to.equal(false);(expect(pcall(u,true,T))).to.equal(false);(expect(pcall(u,100,true))).to.equal(false)end)it("\114\101\116\117\114\110\115 \097 \067\111\108\111\114\051",function()local w=u(T,S);(expect(typeof(w))).to.equal("\067\111\108\111\114\051")end)it("\097\100\106\117\115\116\115 \097 \099\111\108\111\114 \116\111 \109\101\101\116 \116\104\101 \109\105\110\105\109\117\109 \114\097\116\105\111",function()local K=u(T,T)local N=u(S,S)local D=u(Z,S)local R=u(g,T)local W=u(o,S,7);(expect(w(K,e))).to.equal(true);(expect(w(N,J))).to.equal(true);(expect(w(D,d))).to.equal(true);(expect(w(R,C))).to.equal(true);(expect(w(W,s))).to.equal(true)end)end
local BasicallyIdentical = require(script.Parent.Parent.Util.BasicallyIdentical)

return function()
	local GetContrastingColor = require(script.Parent.GetContrastingColor)

	local BLACK = Color3.new()
	local WHITE = Color3.new(1, 1, 1)
	local YELLOW = Color3.new(1, 1, 0)
	local NAVY = Color3.new(0, 0, 1)
	local PINK = Color3.new(1, 0, 1)

	local BB_TARGET = Color3.new(0.777, 0.777, 0.777)
	local WW_TARGET = Color3.new(0.222, 0.222, 0.222)
	local YW_TARGET = Color3.new(0.238, 0.238, 0)
	local NB_TARGET = Color3.new(0.457, 0.457, 1)
	local PW_TARGET = Color3.new(0.448, 0, 0.448)

	it("throws if arguments are not Color3s", function()
		expect(pcall(GetContrastingColor, BLACK, true)).to.equal(false)
		expect(pcall(GetContrastingColor, true, BLACK)).to.equal(false)
		expect(pcall(GetContrastingColor, 100, true)).to.equal(false)
	end)

	it("returns a Color3", function()
		local result = GetContrastingColor(BLACK, WHITE)
		expect(typeof(result)).to.equal("Color3")
	end)

	it("adjusts a color to meet the minimum ratio", function()
		local black = GetContrastingColor(BLACK, BLACK)
		local white = GetContrastingColor(WHITE, WHITE)
		local yellow = GetContrastingColor(YELLOW, WHITE)
		local navy = GetContrastingColor(NAVY, BLACK)

		local pink = GetContrastingColor(PINK, WHITE, 7)

		expect(BasicallyIdentical(black, BB_TARGET)).to.equal(true)
		expect(BasicallyIdentical(white, WW_TARGET)).to.equal(true)
		expect(BasicallyIdentical(yellow, YW_TARGET)).to.equal(true)
		expect(BasicallyIdentical(navy, NB_TARGET)).to.equal(true)

		expect(BasicallyIdentical(pink, PW_TARGET)).to.equal(true)
	end)
end
