w = 256 h = 256 p = {} bright = {0.33, 0.9, 0.12} dark = {0.33, 0.5, 0.12} current_color = bright rev_color = 0 for y = 0, h-1 do if y % 32 == 0 then rev_color = 1 end if y % 64 == 0 then rev_color = 0 end for x = 0, w-1 do if x % 32 == 0 then if rev_color == 0 then current_color = dark end if rev_color == 1 then current_color = bright end end if x % 64 == 0 then if rev_color == 0 then current_color = bright end if rev_color == 1 then current_color = dark end end p[y*w+x+1] = current_color end end