get("#356") -- num2hex get("#348") -- rgb and bright x, y, w, h = 109, 62, 21, 21 print("x2:", x+w, "y2:", y+h, "width, height:", img.width, img.height) function isBright(pix) return bright(rgb(pix)) >= 0.8 end for yy=y, y+h-1 do s = "" for xx=x, x+w-1 do pix = img.getInt(xx, yy) --s = s..num2hex(pix, 6).." " --s = s..(isBright(pix) and "*" or ".") b = string.char(string.byte("A")+math.floor(bright(rgb(pix))*25+0.5)) s = s..b end print(s) end