pixels = {
const red = imagePixel.filter((x,i) => i%4 === 0)
const green = imagePixel.filter((x,i) => i%4 === 1)
const blue = imagePixel.filter((x,i) => i%4 === 2)
const alpha = imagePixel.filter((x,i) => i%4 === 3)
return red.map((_,i) => ({
y: image.height - Math.floor(i/image.width),
x: i%image.width,
red: red[i],
green: green[i],
blue: blue[i],
alpha: alpha[1],
shape: green[i] > blue[i] && green[i] > 200 ? 'green' : blue[i] > 200 ? 'blue' : 'other'
})).map(x=>({...x, hex: chroma(x.red, x.green, x.blue).hex()}))
}