How to create differently colored characters?

Some games let player choose a color, and dye his units in this color.

To achieve this feature, what should I do? (I am just doing a 2-D game)

  1. Limit the colors to 8 kinds and draw 8 sets?
  2. Other ways?