local w=require(script.Parent.Nearest)local u={OBSIDIAN=Color3.fromHex("\035\048\052\048\052\048\067");DANGER=Color3.fromHex("\035\070\067\048\052\048\052"),ORANGE=Color3.fromHex("\035\070\050\054\069\049\070"),GOLD=Color3.fromHex("\035\069\053\067\070\049\056");FOREST=Color3.fromHex("\035\055\065\057\067\050\056");SKY=Color3.fromHex("\035\048\048\065\050\070\070"),LAVENDER=Color3.fromHex("\035\055\068\053\067\065\052"),BUBBLEGUM=Color3.fromHex("\035\070\067\054\050\056\070"),SNOW=Color3.fromHex("\035\067\067\068\054\070\052")}local T={[50]=Color3.fromHex("\035\070\048\070\057\070\070");[100]=Color3.fromHex("\035\069\048\070\050\070\069"),[200]=Color3.fromHex("\035\066\065\069\054\070\068"),[300]=Color3.fromHex("\035\055\068\068\051\070\067"),[400]=Color3.fromHex("\035\051\056\066\068\070\056");[500]=Color3.fromHex("\035\048\069\065\053\069\057");[600]=Color3.fromHex("\035\048\050\056\052\067\055"),[700]=Color3.fromHex("\035\048\051\054\057\065\049"),[800]=Color3.fromHex("\035\048\055\053\057\056\053"),[900]=Color3.fromHex("\035\048\067\052\065\054\069");[950]=Color3.fromHex("\035\048\065\052\051\054\057")}local S={BLACK=Color3.new(0,0,0),RED=Color3.new(1,0,0);GREEN=Color3.new(0,1,0),BLUE=Color3.new(0,0,1);WHITE=Color3.new(1,1,1),RBX_BLUE=Color3.fromHex("\035\048\048\097\050\102\102")}local Z={}for w,u in u do table.insert(Z,u)end return function()it("\114\101\116\117\114\110\115 \097 \067\111\108\111\114\051",function()local u=w(S.BLACK,Z);(expect(typeof(u))).to.equal("\067\111\108\111\114\051")end)it("\114\101\116\117\114\110\115 \116\104\101 \110\101\097\114\101\115\116 \067\111\108\111\114\051",function()local g=w(S.WHITE,Z)local o=w(S.BLUE,Z)local e=w(S.GREEN,Z)local J=w(S.RED,Z)local d=w(S.RBX_BLUE,T);(expect(g)).to.equal(u.SNOW);(expect(o)).to.equal(u.SKY);(expect(e)).to.equal(u.FOREST);(expect(J)).to.equal(u.DANGER);(expect(d)).to.equal(T[500])end)end
local nearest = require(script.Parent.Nearest)

local TEST_COLORS = {
	OBSIDIAN = Color3.fromHex("#04040C"),
	DANGER = Color3.fromHex("#FC0404"),
	ORANGE = Color3.fromHex("#F26E1F"),
	GOLD = Color3.fromHex("#E5CF18"),
	FOREST = Color3.fromHex("#7A9C28"),
	SKY = Color3.fromHex("#00A2FF"),
	LAVENDER = Color3.fromHex("#7D5CA4"),
	BUBBLEGUM = Color3.fromHex("#FC628F"),
	SNOW = Color3.fromHex("#CCD6F4"),
}

local TEST_TAILWIND_SKY = {
	[50] = Color3.fromHex("#F0F9FF"),
	[100] = Color3.fromHex("#E0F2FE"),
	[200] = Color3.fromHex("#BAE6FD"),
	[300] = Color3.fromHex("#7DD3FC"),
	[400] = Color3.fromHex("#38BDF8"),
	[500] = Color3.fromHex("#0EA5E9"),
	[600] = Color3.fromHex("#0284C7"),
	[700] = Color3.fromHex("#0369A1"),
	[800] = Color3.fromHex("#075985"),
	[900] = Color3.fromHex("#0C4A6E"),
	[950] = Color3.fromHex("#0A4369"),
}

local COLOR = {
	BLACK = Color3.new(0, 0, 0),
	RED = Color3.new(1, 0, 0),
	GREEN = Color3.new(0, 1, 0),
	BLUE = Color3.new(0, 0, 1),
	WHITE = Color3.new(1, 1, 1),
	RBX_BLUE = Color3.fromHex("#00a2ff"),
}

local colorArray = {}

for _, color in TEST_COLORS do
	table.insert(colorArray, color)
end

return function()
	it("returns a Color3", function()
		local result = nearest(COLOR.BLACK, colorArray)
		expect(typeof(result)).to.equal("Color3")
	end)

	it("returns the nearest Color3", function()
		local result0 = nearest(COLOR.WHITE, colorArray)
		local result1 = nearest(COLOR.BLUE, colorArray)
		local result2 = nearest(COLOR.GREEN, colorArray)
		local result3 = nearest(COLOR.RED, colorArray)
		local result4 = nearest(COLOR.RBX_BLUE, TEST_TAILWIND_SKY)

		expect(result0).to.equal(TEST_COLORS.SNOW)
		expect(result1).to.equal(TEST_COLORS.SKY)
		expect(result2).to.equal(TEST_COLORS.FOREST)
		expect(result3).to.equal(TEST_COLORS.DANGER)
		expect(result4).to.equal(TEST_TAILWIND_SKY[500])
	end)
end
