Code: Select all
local colours={}
for i=1,255 do
table.insert(colours,{0,0,i})
end
for i=1,255 do
table.insert(colours,{0,i,255})
end
for i=1,255 do
table.insert(colours,{0,i,0})
end
for i=1,255 do
table.insert(colours,{i,255,0})
end
for i=1,255 do
table.insert(colours,{i,0,0})
end
local x=800
local y=600
function love.draw()
for i=1,#colours do
love.graphics.setColor(unpack(colours[i]))
love.graphics.rectangle("fill",x/#colours*(i-x),0,x/#colours,y)
end
end