I'm working on a 3D real time tactics wargame and a primary feature is military customisation. As part of the customisation, I would like to have the player be able to change some of the colors of the unit's texture, similar to how Dawn of War has their color changer. How did they do this?
You can either:
Use the player chosen color when drawing specific polygons on the units. Simple as it sounds, there are certain polygons in the unit model that aren't textured and instead are colored entirely with the color the player chooses. This could be a little flag they're carrying or arm bands or whatever you like.
Use a base color under the texture for the units that will change the overall hue of the texture to that of the chosen color. When drawing a surface you can set its color and put a texture on top of that, with the proper settings for whatever you're using (OpenGL or DirectX), you can have the texture blend with the base color. For the white or transparent portions of your texture, the base color will take over completely.
Use a combination of the above.