In the panel you just want to call the function. With my experiences, the color array is player colors ({"red", "green", etc) and the index will change the entire bg/transparent color.
color0, color1, so on and so on seem to effect each shade of color on the image you're using, starting with the darkest shade. So color0 does the darkest shade on the image, color1, next darkest, so on and so on.
It seemed on some images the colors array didn't start effecting the image colors until color2.
Also a thanks to Deas. We were both testing at once and he lead to things that got me to this, and I believe he got to the same conclusion right before I did anyways (he deserves the credit for this). Figured I'd share, since there is nothing really about this at all.
PHP Code:
setdrawpalette({"red", "blue", "green", "cyan"}, 0)
The first attached image is the original image. The second image, its taking the hair and face separate (they start out separate) using a panel to color the hair for panel 1, then using this to color the face in panel 2, saving those images, then loading another panel and adding those two images together. That is kind of hackish I suppose, but I wanted to explain since the only image I have left is one with 2 parts in it, which is why you'll see different colors for the hair and face. So.... when noticing what it does, best to just look at the hair and shading, then see the transition with the colors.
The script has changed, and I'm already off RC, but the images should show what it does well enough with the description I gave.