How can we obtain the pixels value in RGB or HSB of the image

I’ve been asking for this feature since the very first Beta introduction of imaging API. Then I asked during one of live sessions and there was a promise to look into it, but I assume that promise was never fulfilled and my requests were completely ignored :man_shrugging:

Having said that, as @dotproduct mentioned, you can still calculate the starting index of the chunky data array ([R1, G1, B1, R2, G2, B2, ...]) - idx = ((y * w) + x) * c, where x and y are your pixel coordinates (zero based - 1st being 0,0), w - image width, and c - channel count. You need channel count, because, IIRC, if image hasAlpha is true, the data array includes 4th channel and result would be [R1, G1, B1, A1, R2, G2, B2, A2, ...]

With above formula, let’s say you have 10x10 image and you want to find RGB of a pixel at 4,2 (25th; index 24). Your indexes would be 72 for R, 73 for G and 74 for B (without alpha channel)

Disclaimer: I did not test that, so some things might be wrong