Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Is there any method or plugin for picking the color of a pixel in Construct 2 like photoshop ar any other drawing app?
I want to just get the RGB value of a given pixel (like x,y). If anyone knows, please help me.
Well there is the color picker tool in the image editor.
If you mean at runtime, C2 packs the rgb() system expression.
There is the third-part plugin named "Canvas" that also seems to have a rgbat() expression that might work, but IIRC it may have issues with WebGL.
It is possible but usually inadvisable, unless it is something like the picker. Why do you want to do this ?
I just want to get RGB value at any (x,y) position at C2 runtime
That's going to involve hacking WebGL and/or Canvas. There's probably a better way to do it.
Develop games in your browser. Powerful, performant & highly capable.
How??? Please describe..
This expression will get the red of the pixel under the mouse:
var pixel=ctx.getImageData("&int(LayerToCanvasX(0, mouse.x, mouse.y))&","&int(LayerToCanvasY(0, mouse.x, mouse.y))&",1,1);
You can get the other color components by changing the 0 in
1 for green
2 for blue
3 for alpha