How do I get color (in rgb) of a pixel where I click

Get help using Construct 2

Post » Tue Jun 20, 2017 7:32 am

I managed to change the color of sprite using "Replace color" effect. But I want to do it when clicked on certain portion of a sprite. Say I have a Sprite having three sections of color "color a", "color b", "color c". when user clicks on a section having "color a", I want to change that color to some other color. For that I need which section of the sprite was clicked. Kindly help.
B
8
Posts: 16
Reputation: 332

Post » Tue Jun 20, 2017 2:41 pm

I think you have to use plugin-canvas_t64239 this plugin "rgbaAt(mouse.X,mouse.Y)"
B
15
S
3
Posts: 62
Reputation: 989

Post » Wed Jun 21, 2017 10:15 am

Thanks @WackyToaster. I'll look into it.
B
8
Posts: 16
Reputation: 332

Post » Tue Jun 27, 2017 7:09 am

I tried @WackyToaster solution but it does not returns color of the sprite, instead it returns color of canvas.
B
8
Posts: 16
Reputation: 332


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests