access pixel value of x,y canvas code example Example: getImageData() ctx.getImageData(sx, sy, sw, sh);