In this tutorial I’ll show you how to use AS3 ’s PaletteMap feature to create a character customization interface for your next game.
Why Palette Mapping?
In the past, whenever I wanted to attempt dynamic asset coloring Google searches inevitably led me to the ColorTransform class. ColorTransform works fine for modifying solid colors, but if you’re trying to color a complex piece of art the result is typically not what you want.
With palette mapping we can analyze each pixel of an asset and change the color appropriately to retain the highlights and shading of the original image. It’s not immediately clear from the documentation for paletteMap how to make use of it, so that’s what I’m going to cover here.