width = 200 height = 200 pixels = {} for y = 0, height-1 do for x = 0, width-1 do pixel = y*width+x+1 if x % 3 == 0 and y % 3 == 0 then pixels[pixel] = {1, 0.4, 1} end if x % 2 ~= 2 and y % 2 ~= 1 then pixels[pixel] = {0.7, 1, 0} end if y % 7 == 0 then pixels[pixel] = {0.7, 0.9, 0.91} end if x % 4 == 0 then pixels[pixel] = {0.33, 0.5, 0.12} end end end