1
Create new project
2
Add mouse, text, and canvas objects
3
Give the canvas object an image and position it at 0,0
4
Go to the event editor and add a "every tick" condition.
5
Add the action: text-> set text to canvas.rgbaAt(int(mouse.x), int(mouse.y))
6
Run it and the text object will tell the color under the mouse on the canvas object.
Extra tidbits:
Int() is used since mouse.x can give values like 10.5 when window scaling is used and the value needs to be a whole number.
.rgbaAt uses x and y values relative to the top left of the canvas object. So if you moved the canvas object from 0,0 you'd have to change the expression to:
Canvas.rgbaAt(int(mouse.x-canvas.x), int(mouse.y-canvas.y))
Finally notice it only gets the color from the canvas' own texture. Use the drawing actions to change this texture.