Each pixel uses 4 bytes in the imageData array (r, g, b, a). So here is how to get pixel data at row:x, column:y
function getColorAtPixel(imageData, x, y) {
const {width, data} = imageData
return {
r: data[4 * (width * y + x) + 0],
g: data[4 * (width * y + x) + 1],
b: data[4 * (width * y + x) + 2],
a: data[4 * (width * y + x) + 3]
}
}