mojo2 - How to get RGB with ReadPixels

Monkey Forums/Monkey Programming/mojo2 - How to get RGB with ReadPixels

Ratchet(Posted 2016) [#1]
I want to capture the color at the mouse position using ReadPixels. It worked fine with mojo but I got no idea how to use the DataBuffer now.

How to get the RGB values with ReadPixels in mojo2?

Local db := New DataBuffer(16) ' RGBA = 4 Ints = 16 Bytes????
Local pixel: Int[]
canvas.ReadPixels(MouseX, MouseY, 1, 1, db)
???