Asset - Scripts AEColorMask - Apply color to sprites with pixel-perfect precision [free]


AEColorMask is a shader with a collection of scripts that let you apply a color to specific sprite areas using a mask

Marketplace Link:

With these scripts and shader you can color objects to add variety to your game without creating a bunch of duplicate sprites.

This system doesn't rely on palettes or have any restriction on the original sprite's color count. This means you can apply color to realistic sprites

The scripts set up and handle the shader for you:
  • draw_self_color_mask(...)
  • draw_sprite_color_mask(...)
  • draw_sprite_ext_color_mask(...)
  • draw_sprite_stretched_color_mask(...)
  • draw_sprite_stretched_ext_color_mask(...)
  • draw_sprite_tiled_color_mask(...)
  • draw_sprite_tiled_ext_color_mask(...)
All you have to do is provide the mask sprite (ideally it should be the same size as the original sprite), the mask sprite sub-image (masks and sprites can be animated), the color to apply, and the alpha that the color uses (an alpha of 0 will make the original sprite transparent which is also a neat feature)

There is a demo project included with a lot of helpful information

Documentation link:
Marketplace Link:
GitHub Repository:

I'm always willing to help out if you have any questions or problems. And if you have any suggestions I would be happy to hear them!​