How to change the color of a sprite?

The color of an instance can be changed with image_blend.

image_blend = c_red;

List of colors

Note that this only multiplies the color. So if your sprite is white, then it will appear red; but if it’s a darker color (say dark green) then the product of the original color (dark green) and the new color (red) will be the final result.

The same parameter can also be found in the draw_sprite_ext() function:

draw_sprite_ext(sprite, index, x, y, xscale, yscale, rot, /*THIS*/blend_color, alpha)

With a shader, you can override the RGB values of the sprite with the RGB values of the blend color:

gl_FragColor.rgb = v_vColour.rgb;

This way, if your blend color is c_red, then all pixels in the sprite will actually turn red (no matter what the original color is).